Kitaru

CredentialStoreTokenSource

Token source backed by the credentials stored for one server.

Functions

func__init__(self, base_url, store, exchange) -> None

Initialize the source.

paramself
parambase_urlstr

Server base URL credentials are stored under.

paramstoreCredentialStore

Credential store holding the token and the way to renew it.

paramexchangeTokenExchange

Login endpoint calls used to renew the token.

Returns

None
funcget_cached_token(self) -> str | None

Return the stored bearer token.

paramself

Returns

str | None

Bearer token, or None when nothing usable is stored.

funcfetch_token(self) -> str | None

Fetch a fresh bearer token and write it back to the store.

paramself

Returns

str | None

Bearer token, or None when nothing stored can produce one.

funcclose(self) -> None

Close the control plane session the source opened.

paramself

Returns

None

On this page