4.7.2.1. Authenticating¶
Authentication via API key and API secret.
- class axonius_api_client.auth.api_key.ApiKey(http, key, secret, **kwargs)[source]¶
Bases:
Mixins
Authentication method using API key & API secret.
- Parameters
http (
axonius_api_client.http.Http
) –key (
str
) –secret (
str
) –
- __init__(http, key, secret, **kwargs)[source]¶
Authenticate using API key & API secret.
- Parameters
http (
axonius_api_client.http.Http
) – HTTP client to use to send requestskey (
str
) – API key to use in credentialssecret (
str
) – API secret to use in credentials
- _check_http_lock()¶
Check HTTP client not already used by another Auth.
- Raises
AuthError – When the HTTP client supplied is already being used by another Auth method.
- _get_api_keys(**http_args)¶
Direct API method to get the API keys for the current user.
- Return type
- _set_http_lock()¶
Set HTTP Client auth lock.
- _validate()¶
Validate credentials.
- check_login()¶
Check if login has been called.
- Raises
NotLoggedIn – When login has not been called before trying to make a call with this Auth model.
- property endpoints: ApiEndpoints(groups=['instances', 'central_core', 'system_settings', 'remote_support', 'system_users', 'system_roles', 'lifecycle', 'adapters', 'signup', 'password_reset', 'audit_logs', 'enforcements', 'saved_queries', 'assets', 'openapi', 'data_scopes', 'dashboard_spaces', 'folders_queries', 'folders_enforcements', 'account'])¶
Get the endpoint group for this module.
- LOG: logging.Logger¶
Logger for this object.