aistore.sdk.authn.authn_client
aistore.sdk.authn.authn_client
Module Contents
Classes
Data
API
AuthN client for managing authentication.
This client provides methods to interact with AuthN Server. For more info on AuthN Server, see https://github.com/NVIDIA/aistore/blob/main/docs/authn.md
Parameters:
AuthN service endpoint URL.
If True, skip SSL certificate verification. Defaults to False.
Path to a CA certificate file for SSL verification.
Request timeout in seconds; a single float for both connect/read timeouts (e.g., 5.0), a tuple for separate connect/read timeouts (e.g., (3.0, 10.0)), or None to disable timeout.
Retry configuration object from the urllib3 library.
Authorization token.
Get the request client.
Factory method to create a ClusterManager instance.
Returns: ClusterManager
An instance to manage cluster operations.
Logs in to the AuthN Server and returns an authorization token.
Parameters:
The username to log in with.
The password to log in with.
The expiration duration of the token in seconds.
Returns: str
An authorization token to use for future requests.
Raises:
ValueError: If the password is empty or consists only of spaces.Exception: If the login request fails or any other error occurs.
Logs out and revokes current token from the AuthN Server.
Raises:
ValueError: If no token is available (not logged in).Exception: If the logout request fails or any other error occurs.
Factory method to create a RoleManager instance.
Returns: RoleManager
An instance to manage role operations.
Factory method to create a TokenManager instance.
Returns: TokenManager
An instance to manage token operations.
Factory method to create a UserManager instance.
Returns: UserManager
An instance to manage user operations.