Skip to content

common_auth.tokens.base

Shared access-token delivery, validity, cache and deadline policy.

Classes

BaseTokens

Bases: ABC

One delivery policy for managed, stored and remote token sources.

Cache time never changes issuance time. Each call checks the requested bindings even when it reuses a cached access value. The operation value is access-only; owner-side acquisition evidence remains protected diagnostic material. Collaborators passed by callers are borrowed.

__init__

def __init__(config: _TokenConfig, *, issuer: str | None = None, client_id: str | None = None) -> None

Fields and properties declared here; inherited members belong to the bases above.

config

config = config

get

async def get(*, force_refresh: bool = False, rejected_token: AccessToken | SecretStr | str | None = None, audience: str | None = None, scopes: ScopeSet | None = None, proof_key: KeyBinding | None = None) -> AuthResult[AccessToken]

Deliver one usable token or one explicit failure; never loop acquisition.