class documentation
class CachedBearer(ParentBearer): (source)
Constructor: CachedBearer(service_account_id, source, channel, max_retries, ...)
Convenience wrapper that caches impersonated tokens in memory.
| Method | __init__ |
Create a cached impersonation bearer. |
| Method | receiver |
Return a receiver from the cached bearer chain. |
| Method | set |
Attach auth metrics callbacks to the chain. |
| Property | wrapped |
Return the cached bearer chain. |
| Instance Variable | _impersonated |
Undocumented |
| Instance Variable | _source |
Undocumented |
Inherited from Bearer:
| Class Method | default |
Return this bearer's default fully qualified metric provider label. |
| Async Method | close |
Close the bearer and any wrapped resources. |
| Property | metrics |
Provider label used for auth metrics. |
| Property | name |
Optional human-readable name for the bearer. |
def __init__(self, service_account_id:
str, source: ParentBearer, channel: ClientChannelInterface | DeferredChannel | None = None, max_retries: int = 2, metrics: AuthMetricsLike = None):
(source)
¶
Create a cached impersonation bearer.