csrf

package
v0.0.0-...-138c254 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2014 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCSRFMissing      = errors.New("CSRF token is missing")
	ErrCSRFDoesNotMatch = errors.New("CSRF token does not match")
)

Functions

func GenerateToken

func GenerateToken(session *sessions.Session) string

func Token

func Token(session *sessions.Session) string

Types

type Field

type Field struct {
	gforms.BaseField
	// contains filtered or unexported fields
}

func NewField

func NewField(session *sessions.Session) *Field

func (*Field) Render

func (f *Field) Render(attrs ...string) template.HTML

func (*Field) SetInitial

func (f *Field) SetInitial(initial string)

func (*Field) Validate

func (f *Field) Validate(rawValue interface{}) error

func (*Field) Value

func (f *Field) Value() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL