CredentialStoreTokenSource
Token source backed by the credentials stored for one server.
Functions
func__init__(self, base_url, store, exchange) -> NoneInitialize the source.
paramselfparambase_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(self) -> str | NoneReturn the stored bearer token.
paramselfReturns
str | NoneBearer token, or None when nothing usable is stored.
funcfetch_token(self) -> str | NoneFetch a fresh bearer token and write it back to the store.
paramselfReturns
str | NoneBearer token, or None when nothing stored can produce one.
funcclose(self) -> NoneClose the control plane session the source opened.
paramselfReturns
None