Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCreateFailure is returned wrapped from generate when a token fails // to create ErrCreateFailure = errors.New("an error occurred while creating a token") // ErrInvalidToken is returned if a provided security token is not legit ErrInvalidToken = errors.New("the provided token is not valid") // ErrTokenExpired is returned when a token is not longer available for use ErrTokenExpired = errors.New("the provided token has expired") // ErrTokenNotFound when the token is not found ErrTokenNotFound = errors.New("the provided token does not exist") )
Functions ¶
func GenerateToken ¶
GenerateToken generates pieces needed for user confirm selector: hash of the first half of a 64 byte value (to be stored in the database and used in SELECT query) verifier: hash of the second half of a 64 byte value (to be stored in database but never used in SELECT query) token: the user-facing base64 encoded selector+verifier
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.