5.2.14. xgt.cached_credentials_auth¶
- xgt.cached_credentials_auth(config: OidcCredentialsAuth) BearerTokenAuth¶
Return a valid BearerTokenAuth for a service client, using the cache.
Experimental: The API of this function may change in future releases.
Unlike cached_oidc_auth there is no interactive fallback: when the cached token is expired the client credentials flow is run again automatically. No refresh token handling is needed since the client can always re-authenticate.
- Parameters:
config (OidcCredentialsAuth) – Service-client credentials configuration (client id and secret).
- Returns:
Authentication carrying a valid access token.
- Return type: