Documentation ¶ Index ¶ Constants type Csrf func New(expires time.Duration, cipher core.Cypher) *Csrf func (csrf Csrf) Check(token string) bool func (csrf Csrf) CheckRequest(req *http.Request) bool func (csrf Csrf) Generate() string Constants ¶ View Source const ContextKey string = "phx-csrf" View Source const CsrfHeaderName string = "X-Csrf-Token" Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Csrf ¶ type Csrf struct { // contains filtered or unexported fields } func New ¶ func New(expires time.Duration, cipher core.Cypher) *Csrf func (Csrf) Check ¶ func (csrf Csrf) Check(token string) bool func (Csrf) CheckRequest ¶ func (csrf Csrf) CheckRequest(req *http.Request) bool func (Csrf) Generate ¶ func (csrf Csrf) Generate() string Source Files ¶ View all Source files csrf.go middleware.go Click to show internal directories. Click to hide internal directories.