iqm.iqm_client.cli.auth

iqm.iqm_client.cli.auth#

Authorization and session management for IQM Client CLI.

Functions

login_request(url, realm, client_id, ...)

Sends login request to the authentication server.

logout_request(url, realm, client_id, ...)

Sends logout request to the authentication server.

refresh_request(url, realm, client_id, ...)

Sends refresh request to the authentication server.

slash_join(a, b)

Join two URL segments together, ensuring a single slash between them.

time_left_seconds(token)

Check how much time is left until the token expires.

token_is_valid(refresh_token)

Check if token is not about to expire.

Classes

AuthRequest(*, client_id[, grant_type, ...])

Request sent to authentication server for access token and refresh token, or for terminating the session. * Token request with grant type 'password' starts a new session in the authentication server. It uses fields client_id, grant_type, username and password. * Token request with grant type 'refresh_token' is used for maintaining an existing session. It uses field client_id, grant_type, refresh_token. * Logout request uses only fields client_id and refresh_token.

GrantType(value[, names, module, qualname, ...])

Type of token request.

Exceptions

ClientAccountSetupError

User's account has not been fully set up yet.

ClientAuthenticationError

Something went wrong with user authentication.

Inheritance

Inheritance diagram of iqm.iqm_client.cli.auth