iqm.iqm_client.iqm_client.AuthRequest#

class iqm.iqm_client.iqm_client.AuthRequest(*, client_id, grant_type=None, username=None, password=None, refresh_token=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_computed_fields

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config

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

model_fields

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

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_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}#

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}#

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

model_fields: ClassVar[dict[str, FieldInfo]] = {'client_id': FieldInfo(annotation=str, required=True), 'grant_type': FieldInfo(annotation=Union[GrantType, NoneType], required=False, default=None), 'password': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'refresh_token': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'username': FieldInfo(annotation=Union[str, NoneType], required=False, default=None)}#

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.