iqm.iqm_client.authentication.TokenClient

iqm.iqm_client.authentication.TokenClient#

class iqm.iqm_client.authentication.TokenClient(auth_server_url: str, realm: str, username: str, password: str)#

Bases: TokenProviderInterface

Requests new token from an authentication server

Attributes

PASSWORD_GRANT_TYPE

REFRESH_TOKEN_GRANT_TYPE

Methods

_get_access_token_from_server(grant_type)

Get new access token from the server and update refresh token.

close()

Close authentication session

get_token()

Get new access token and refresh token from the server

Parameters:
  • auth_server_url (str) –

  • realm (str) –

  • username (str) –

  • password (str) –

get_token() str#

Get new access token and refresh token from the server

Return type:

str

close() None#

Close authentication session

Return type:

None