class documentation

Bearer that requests a fresh token from a metadata service.

Method __init__ Undocumented
Method receiver Return a Receiver to be used for a single request.
Property metrics_provider Provider label used for auth metrics.
Property name Optional human-readable name for the bearer.
Instance Variable _endpoint Undocumented

Inherited from Bearer:

Class Method default_metrics_provider Return this bearer's default fully qualified metric provider label.
Async Method close Close the bearer and any wrapped resources.
Property acquisition_budget Return how long one fetch through this bearer can take, or None.
Property wrapped Return the wrapped bearer or None if not wrapping.
def __init__(self, endpoint: str): (source)

Undocumented

def receiver(self) -> Receiver: (source)

Return a Receiver to be used for a single request.

Implementations should return a receiver that can safely be used by a single request/Authenticator instance. It may return a shared receiver or create a new one depending on the provider semantics.

Returns
ReceiverA fresh and unique token Receiver.
@property
metrics_provider: str = (source)

Provider label used for auth metrics.

Custom bearers may override this property to control their metric provider label. By default the label is the fully qualified class name, or the wrapped bearer's provider label for wrapper bearers.

Optional human-readable name for the bearer.

This may be used in some wrapper providers to cache the results of the shared receiver, or to report diagnostics.

This name should reflect the unique configuration of the bearer.

If the bearer wraps another bearer, the default behaviour is to forward the name lookup to the wrapped instance.

Returns
str or NoneUndocumented
_endpoint = (source)

Undocumented