AuthClient
from carmen_cloud_client import AuthClient
Exchanges an API key for short-lived (60-minute) bearer access tokens and caches the current token until shortly before it expires. Thread-safe.
Methods
Constructor
def __init__(self, options: AuthClientOptions)
get_access_token
def get_access_token(self, force_refresh: bool=False) -> TokenResponse
Returns a valid access token, requesting a new one when the cached one is missing or expiring.
create_access_token
def create_access_token(self) -> TokenResponse
Requests a new access token, bypassing the cache.
get_jwks
def get_jwks(self) -> JsonWebKeySet
Fetches the public keys that verify the issued tokens (RS256 JWTs).