antimatter.utils.auth
#
Module Contents#
Functions#
|
Authenticate a domain with the given domain_id and domain_authenticate object. |
- antimatter.utils.auth.authenticate(client: antimatter_api.ApiClient, domain_authenticate: antimatter_api.DomainAuthenticate, domain_id: str, identity_provider_name: str = None, token_lifetime: int | None = None) str #
Authenticate a domain with the given domain_id and domain_authenticate object. This function will return the token for the authenticated domain. It will try to catch a few specific exceptions and raise a SessionError with a more user-friendly message.
- Parameters:
client – The client to use for the request.
domain_authenticate – The domain authenticate object to use for the request.
domain_id – The domain ID to authenticate.
identity_provider_name – The identity provider name to authenticate with.
token_lifetime – How long the token should last for, in seconds.
- Returns:
The token for the authenticated domain.