Documentation ¶
Overview ¶
Package xsrftoken provides methods for generating and validating secure XSRF tokens.
Index ¶
Constants ¶
Timeout is the duration for which XSRF tokens are valid. It is exported so clients may set cookie timeouts that match generated tokens.
Variables ¶
This section is empty.
Functions ¶
func Generate ¶
Generate returns a URL-safe secure XSRF token that expires in 24 hours.
key is a secret key for your application; it must be non-empty. userID is an optional unique identifier for the user. actionID is an optional action the user is taking (e.g. POSTing to a particular path).
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.