Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingHeader = errors.New("CSRF missing csrf token in header") ErrInvalidToken = errors.New("CSRF invalid token") )
Functions ¶
This section is empty.
Types ¶
type Csrf ¶
type Csrf struct { Key string CookieName string SaltName string HeaderName string Domain string IgnoreMethods map[string]bool }
func (*Csrf) SetToken ¶
func (x *Csrf) SetToken(c *app.RequestContext)
func (*Csrf) VerifyToken ¶
func (x *Csrf) VerifyToken(skip bool) app.HandlerFunc
type Option ¶
type Option func(x *Csrf)
func SetCookieName ¶
func SetHeaderName ¶
func SetIgnoreMethods ¶
func SetSaltName ¶
Click to show internal directories.
Click to hide internal directories.