1
0
mirror of https://github.com/volatiletech/authboss.git synced 2025-02-03 13:21:22 +02:00

Add form value name for xsrf tokens.

This commit is contained in:
Aaron L 2015-01-27 17:34:55 -08:00
parent b3042339d0
commit c1670a041f
2 changed files with 5 additions and 4 deletions

View File

@ -32,14 +32,15 @@ type Config struct {
EmailFrom string
EmailSubjectPrefix string
SMTPAddress string
SMTPAuth smtp.Auth
SMTPAddress string
SMTPAuth smtp.Auth
XSRFName string
XSRFMaker XSRF
Storer Storer
CookieStoreMaker CookieStoreMaker
SessionStoreMaker SessionStoreMaker
XSRFMaker XSRF
LogWriter io.Writer
Callbacks *Callbacks
Mailer Mailer

View File

@ -3,4 +3,4 @@ package authboss
import "net/http"
// XSRF returns a token that should be written to forms to prevent xsrf attacks.
type XSRF func(http.ResponseWriter, *http.Request) string
type XSRF func(http.ResponseWriter, *http.Request) (token string)