iqm.iqm_client.cli.auth.AuthRequest#

class iqm.iqm_client.cli.auth.AuthRequest(*, client_id: str, grant_type: GrantType | None = None, username: str | None = None, password: str | None = None, refresh_token: str | None = None)#

Bases: BaseModel

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.

Attributes

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

client_id

name of the client for all request types

grant_type

type of token request, in {'password', 'refresh_token'}

username

username for grant type 'password'

password

password for grant type 'password'

refresh_token

refresh token for grant type 'refresh_token' and logout request

Methods

Parameters:
  • client_id (str) –

  • grant_type (GrantType | None) –

  • username (str | None) –

  • password (str | None) –

  • refresh_token (str | None) –

client_id: str#

name of the client for all request types

grant_type: GrantType | None#

type of token request, in {'password', 'refresh_token'}

username: str | None#

username for grant type 'password'

password: str | None#

password for grant type 'password'

refresh_token: str | None#

refresh token for grant type 'refresh_token' and logout request

model_config: ClassVar[ConfigDict] = {}#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].