CredentialStoreTokenSource
Token source backed by the credentials stored for one server.
Token source backed by the credentials stored for one server.
Functions
constructor__init__(base_url, store, exchange) -> NoneInitialize the source.
parambase_urlstrServer base URL credentials are stored under.
paramstoreCredentialStoreCredential store holding the token and the way to renew it.
paramexchangeTokenExchangeLogin endpoint calls used to renew the token.
Returns
Nonefuncget_cached_token() -> str | NoneReturn the stored bearer token.
Returns
str | NoneBearer token, or None when nothing usable is stored.
funcfetch_token() -> str | NoneFetch a fresh bearer token and write it back to the store.
Returns
str | NoneBearer token, or None when nothing stored can produce one.
funcclose() -> NoneClose the control plane session the source opened.
Returns
None