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:
axonius_api_client.auth.models.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.
-
_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
http
¶ Get HttpClient object.
- Return type
-
LOG
: logging.Logger¶ Logger for this object.