Versions in this module Expand all Collapse all v0 v0.10.1 Jul 30, 2018 v0.10.0 Jul 7, 2018 Changes in this version + var ErrBadReferer = errors.New("security/anticsrf: bad referer") + var ErrMalformedReferer = errors.New("security/anticsrf: malformed referer") + var ErrNoCookieFound = errors.New("security/anticsrf: no cookie found") + var ErrNoReferer = errors.New("security/anticsrf: no referer") + func IsSafeHTTPMethod(method string) bool + func IsSameOrigin(a, b *url.URL) bool + type AntiCSRF struct + Enabled bool + func New(cfg *config.Config) (*AntiCSRF, error) + func (ac *AntiCSRF) CipherSecret(r *ahttp.Request) []byte + func (ac *AntiCSRF) ClearCookie(w http.ResponseWriter, r *ahttp.Request) + func (ac *AntiCSRF) GenerateSecret() []byte + func (ac *AntiCSRF) IsAuthentic(secret, requestSecret []byte) bool + func (ac *AntiCSRF) RequestCipherSecret(r *ahttp.Request) []byte + func (ac *AntiCSRF) SaltCipherSecret(secret []byte) string + func (ac *AntiCSRF) SetCookie(w http.ResponseWriter, secret []byte) error