Messages¶
The following section documents everything related to OAuth2.
Models¶
OAuth2ScopeReasoning¶
OAuth2AccessToken¶
Attributes
Methods
- async revoke
- class stoat.OAuth2AccessToken(*, state, access_token, refresh_token, token_type, scopes)[source]¶
Represents result of exchanging OAuth2 code, or refreshing token.
Added in version 1.2.
- await revoke(*, http_overrides=None)[source]¶
This function is a coroutine.
Revokes the OAuth2 token.
- Parameters:
http_overrides (Optional[
HTTPOverrideOptions]) – The HTTP request overrides.- Raises:
HTTPException– Possible values fortype:Value
Reason
InvalidOperationThe token was already revoked.
Unauthorized– Possible values fortype:Value
Reason
NotAuthenticatedThe token was invalid.
NotFound– Possible values fortype:Value
Reason
NotFoundThe OAuth2 authorization was deleted.
- Returns:
The revoked OAuth2 authorization.
- Return type:
OAuth2Authorization