Source code for aiohttp_oauth2_client.models.response

from typing import Optional

from pydantic import BaseModel


[docs] class AuthorizationResponse(BaseModel): """ The Authorization Response model. https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2 :ivar code: The authorization code generated by the authorization server. :ivar state: State """ code: str """Authorization code generated by the authorization server""" state: Optional[str] = None """State parameter from the client authorization request, if it was present"""
[docs] class DeviceAuthorizationResponse(BaseModel): """ The Device Authorization Response model. https://datatracker.ietf.org/doc/html/rfc8628#section-3.2 """ device_code: str """Device verification code""" user_code: str """End-user verification code""" verification_uri: str """End-user verification URI on the authorization server""" verification_uri_complete: Optional[str] = None """Verification URI that includes the "user_code" which is designed for non-textual transmission.""" expires_in: int """Lifetime in seconds of the "device_code" and "user_code".""" interval: int = 5 """Minimum amount of time in seconds that the client SHOULD wait between polling requests to the token endpoint."""
[docs] class ErrorResponse(BaseModel): """ OAuth2 Error Response model. https://datatracker.ietf.org/doc/html/rfc6749#section-5.2 """ error: str """A single ASCII error code""" error_description: Optional[str] = None """Human-readable ASCII text providing additional information, used to assist the client developer in understanding the error that occurred.""" error_uri: Optional[str] = None """A URI identifying a human-readable web page with information about the error, used to provide the client developer with additional information about the error."""