iqm.iqm_client.iqm_client.Credentials#

class iqm.iqm_client.iqm_client.Credentials(*, auth_server_url, username, password, access_token=None, refresh_token=None)#

Bases: BaseModel

Credentials and tokens for maintaining a session with the authentication server.

  • Fields auth_server_url, username and password are provided by the user.

  • Fields access_token and refresh_token are loaded from the authentication server and refreshed periodically.

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].

auth_server_url

Base URL of the authentication server

username

username for logging in to the server

password

password for logging in to the server

access_token

current access token of the session

refresh_token

current refresh token of the session

Methods

Parameters:
  • auth_server_url (str) –

  • username (str) –

  • password (str) –

  • access_token (str | None) –

  • refresh_token (str | None) –

auth_server_url: str#

Base URL of the authentication server

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]] = {'access_token': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'auth_server_url': FieldInfo(annotation=str, required=True), 'password': FieldInfo(annotation=str, required=True), 'refresh_token': FieldInfo(annotation=Union[str, NoneType], required=False, default=None), 'username': FieldInfo(annotation=str, required=True)}#

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

This replaces Model.__fields__ from Pydantic V1.

username: str#

username for logging in to the server

password: str#

password for logging in to the server

access_token: str | None#

current access token of the session

refresh_token: str | None#

current refresh token of the session