Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DoubleEncodedTokenSize = 32
View Source
var EncodedTokenSize = 24
View Source
var ErrInvalidLength = errors.New("invalid length")
View Source
var TokenSize = 18
Functions ¶
func GenerateToken ¶
func GenerateToken() string
GenerateToken generates a new random token that can be used as a CSRF token. Ideally, a unique token for each session should be generated. On can use the masking technique to generate a unique token for each request, that can still be verified against a session-unique token.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.