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 fieldsclient_id
,grant_type
,username
andpassword
.Token request with grant type
'refresh_token'
is used for maintaining an existing session. It uses fieldclient_id
,grant_type
,refresh_token
.Logout request uses only fields
client_id
andrefresh_token
.
Attributes
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
name of the client for all request types
type of token request, in
{'password', 'refresh_token'}
username for grant type
'password'
password for grant type
'password'
refresh token for grant type
'refresh_token'
and logout requestMethods
- Parameters:
- 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.