ResponsesΒΆ
from aioauth import responses
Response objects used throughout the project.
-
class
ErrorResponse
(error: Literal[invalid_request, invalid_client, invalid_grant, invalid_scope, unauthorized_client, unsupported_grant_type, unsupported_response_type, unsupported_token_type, insecure_transport, mismatching_state, method_is_not_allowed, server_error, temporarily_unavailable], description: str, error_uri: str = '')[source]ΒΆ Response for errors.
-
error
: Literal[invalid_request, invalid_client, invalid_grant, invalid_scope, unauthorized_client, unsupported_grant_type, unsupported_response_type, unsupported_token_type, insecure_transport, mismatching_state, method_is_not_allowed, server_error, temporarily_unavailable]ΒΆ
-
description
: strΒΆ
-
error_uri
: str = ''ΒΆ
-
-
class
AuthorizationCodeResponse
(code: str, scope: str)[source]ΒΆ Response for
authorization_code
.Used by
aioauth.response_type.ResponseTypeAuthorizationCode
.-
code
: strΒΆ
-
scope
: strΒΆ
-
-
class
NoneResponse
[source]ΒΆ Response for
aioauth.response_type.ResponseTypeNone
.
-
class
TokenResponse
(expires_in: int, refresh_token_expires_in: int, access_token: str, refresh_token: str, scope: str, token_type: str = 'Bearer')[source]ΒΆ Response for valid token.
Used by
aioauth.response_type.ResponseTypeToken
.-
expires_in
: intΒΆ
-
refresh_token_expires_in
: intΒΆ
-
access_token
: strΒΆ
-
refresh_token
: strΒΆ
-
scope
: strΒΆ
-
token_type
: str = 'Bearer'ΒΆ
-
-
class
IdTokenResponse
(id_token: str)[source]ΒΆ Response for OpenID id_token.
Used by
aioauth.response_type.ResponseResponseTypeIdTokenTypeToken
.-
id_token
: strΒΆ
-
-
class
TokenActiveIntrospectionResponse
(scope: str, client_id: str, token_type: Literal[access_token, refresh_token], expires_in: int, active: bool = True)[source]ΒΆ Response for a valid access token.
Used by
aioauth.server.AuthorizationServer.create_token_introspection_response()
.-
scope
: strΒΆ
-
client_id
: strΒΆ
-
token_type
: Literal[access_token, refresh_token]ΒΆ
-
expires_in
: intΒΆ
-
active
: bool = TrueΒΆ
-
-
class
TokenInactiveIntrospectionResponse
(active: bool = False)[source]ΒΆ For an invalid, revoked or expired token.
Used by
aioauth.server.AuthorizationServer.create_token_introspection_response()
.-
active
: bool = FalseΒΆ
-
-
class
Response
(content: Dict = <factory>, status_code: http.HTTPStatus = <HTTPStatus.OK: 200>, headers: aioauth.collections.HTTPHeaderDict = <factory>)[source]ΒΆ General response class.
Used by
aioauth.server.AuthorizationServer
.-
content
: DictΒΆ
-
status_code
: http.HTTPStatus = 200ΒΆ
-
headers
: aioauth.collections.HTTPHeaderDictΒΆ
-