Structs§
- Token
Payload - Token payload - the claims inside a signed token.
Enums§
- Token
Error - Token
Scope - Token scopes - browser sessions get short-lived tokens, CLI gets longer-lived ones.
Functions§
- generate_
secret - Generate a cryptographically secure random secret (32 bytes).
- secret_
from_ hex - Decode a hex string back to secret bytes.
- secret_
to_ hex - Encode a secret as hex string for storage.
- sign_
token - Sign a token payload with HMAC-SHA256.
- verify_
token - Verify and decode a token string.
- verify_
token_ with_ scope - Verify a token and enforce a specific scope.