Documentation ¶
Overview ¶
Opaque Tokens are generated from a random string with appended 8 digit crc32 hex checksum and encoded in base64 with a prefix depending on their type.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StdTokenManager ¶
type StdTokenManager struct {
// contains filtered or unexported fields
}
func MakeManager ¶
func MakeManager(config Config) StdTokenManager
func (StdTokenManager) DecodeOpaque ¶
func (StdTokenManager) DecodeOpaque(typ tokens.OpaqueTokenPrefix, encodedOpaqueToken string) (string, error)
DecodeOpaque decodes a opaque AccessToken and returns a non-nil error if it's invalid.
func (StdTokenManager) Encode ¶
GenerateAccessToken returns an access token following this package's specification or a non-nil error on validation failure.
func (StdTokenManager) GenerateOpaque ¶
func (StdTokenManager) GenerateOpaque(typ tokens.OpaqueTokenPrefix) (string, string, error)
GenerateOpaque generates an opaque token. It returns an encoded token, a random string used as a token's base and an err.
Click to show internal directories.
Click to hide internal directories.