Skip to content

common_auth.tokens.remote

Read access credentials from a keeper using an explicit wire decoder.

Classes

KeeperTokenDecoder

Normalize a token keeper’s /token response (market-gateways shape) at its boundary.

The caller supplies the trusted keeper identity, binding and HTTP token type. Vendor, scheme and keeper kind are checked on every response. The keeper’s kind identifies its product (for example access or session), independently of the HTTP token type. The keeper’s absolute expires_at is retained; reading again never manufactures a new issuance/expiry time.

__init__

def __init__(*, vendor: str, binding: TokenBinding, scheme: str, kind: str = 'access', token_type: str = 'Bearer') -> None

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

token_type

token_type = token_type

RemoteTokens

Bases: BaseTokens

Read-only keeper consumer; never holds issuer refresh credentials.

__init__

def __init__(config: RemoteTokenConfig, *, decoder: Callable[[object], AccessToken], http: HttpClient | None = None, values: Mapping[str, object] | None = None, issuer: str | None = None, client_id: str | None = None) -> None

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

config

config: RemoteTokenConfig = config

aclose

async def aclose() -> None

aopen

async def aopen() -> Self