class documentation

Undocumented

Method __init__ Undocumented
Method can_retry Delegate retry decisions to the wrapped receiver.
Async Method fetch Fetch a token and record the result.
Property latest Return the wrapped receiver's latest token.
Async Method _fetch Low-level asynchronous fetch implementation.
Instance Variable _attempt Undocumented
Instance Variable _metrics Undocumented
Instance Variable _receiver Undocumented

Inherited from Receiver:

Instance Variable _latest The most recently fetched token, or None if no token has been fetched yet. Implementations may update this to support inspection or caching by callers.
def __init__(self, receiver: _TokenReceiver, metrics: AuthMetricsRecorder): (source)

Undocumented

def can_retry(self, err: Exception, options: dict[str, str] | None = None) -> bool: (source)

Delegate retry decisions to the wrapped receiver.

async def fetch(self, timeout: float | None = None, options: dict[str, str] | None = None) -> _Token: (source)

Fetch a token and record the result.

Return the wrapped receiver's latest token.

async def _fetch(self, timeout: float | None = None, options: dict[str, str] | None = None) -> _Token: (source)

Low-level asynchronous fetch implementation.

Subclasses must implement this method to perform the actual token retrieval. This method is intentionally prefixed with an underscore to indicate it is the minimal primitive; callers should use fetch which records the result in _latest.

Parameters
timeout:optional floatOptional timeout in seconds for the fetch operation.
options:optional dict[str, str]Optional implementation-specific options forwarded by the request layer.
Returns
TokenA freshly fetched Token.
_attempt: int = (source)

Undocumented

_metrics = (source)

Undocumented

_receiver = (source)

Undocumented