Discover Packages
github.com/danverbraganza/camlistore
third_party
code.google.com
p
xsrftoken
package
Version:
v0.0.0-...-a9d0b9c
Opens a new window with list of versions in this module.
Published: Oct 29, 2014
License: Apache-2.0, Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package xsrftoken provides methods for generating and validating secure XSRF tokens.
The duration that XSRF tokens are valid.
It is exported so clients may set cookie timeouts that match generated tokens.
Generate returns a URL-safe secure XSRF token that expires in 24 hours.
key is a secret key for your application.
userID is a unique identifier for the user.
actionID is the action the user is taking (e.g. POSTing to a particular path).
func Valid(token, key, userID, actionID string ) bool
Valid returns true if token is a valid, unexpired token returned by Generate.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.