Documentation ¶
Index ¶
Constants ¶
View Source
const Prefix = "rill"
Prefix is prepended to every auth token.
Variables ¶
View Source
var ErrMalformed = errors.New("malformed auth token")
ErrMalformed is used when attempting to parse an invalid token string.
Functions ¶
This section is empty.
Types ¶
type Token ¶
Token is a parsed authentication token with a type, UUID ID, and 24-byte secret. Tokens can be (de)serialized as strings. Example string representation of a user token: rill_usr_2Dws32dc2FxTThgCQjHerGM1rx9pJLCPQh5QbWjUiwpkZNkCCRrlrK.
func FromString ¶
FromString re-creates a token from it's string representation (acquired by calling String()). The things I do for pretty tokens.
func (*Token) SecretHash ¶
SecretHash returns a SHA256 hash of the token secret.
Click to show internal directories.
Click to hide internal directories.