Expand description
Credentials seen by the shared HTTP layer: a TokenSource gives a bearer
token (or signs a request in the auth-* crates), and TokenCache keeps
it until exp - 5 min with one forced refresh on 401 (plan §6, C8).
Structs§
- Access
Token - A token and how long it stays valid.
- Secret
String - A secret string whose
Debug/Displaynever print the value. - Static
Token - A token that never changes (Fly deploy token, tests).
- Token
Cache - Caches a
TokenFetcher’s token untilexp - REFRESH_MARGIN. Concurrent callers share one fetch (the lock is held while fetching).
Constants§
- REFRESH_
MARGIN - Refresh margin before expiry.
Traits§
- Token
Fetcher - Fetches fresh tokens (metadata server, STS, Entra, a static deploy token).
- Token
Source - What the HTTP client asks for: a current token, or a forced refresh after a 401.