Documentation ¶
Index ¶
Constants ¶
View Source
const ( SecretSize = crypto.KeySize256 HashSize = crypto.KeySize256 )
Variables ¶
View Source
var ( ErrTokenIsNotValid = errors.New("token is not valid") ErrDataIsTooLong = errors.New("data is too long") )
Functions ¶
This section is empty.
Types ¶
type Token ¶
type Token struct {
// contains filtered or unexported fields
}
func FromIdAndHash ¶
FromIdAndHash creates a new token from an ID and a Hash it means that the token needs to be refreshed with `Refresh` before being able to use it as we din't have the secret, and thus cannot convert it to a valid string
Click to show internal directories.
Click to hide internal directories.