redditwarp.auth.grants#
- class redditwarp.auth.grants.AuthorizationGrant[source]#
Bases:
Mapping[str,str]A class to construct authorization grant mappings conveniently.
An authorization grant is a credential representing the resource owner’s authorization that’s used to exchange for a bearer token.
An empty string should be treated the same as
Nonein all fields annotated asOptional. The annotations reflect the field value requirements of the various grants types defined in the OAuth2 spec.- GRANT_TYPE: ClassVar[str] = ''#
- class redditwarp.auth.grants.AuthorizationCodeGrant(code: 'str', redirect_uri: 'Optional[str]', client_id: 'Optional[str]' = None)[source]#
Bases:
AuthorizationGrant- GRANT_TYPE: ClassVar[str] = 'authorization_code'#
- code: str#
- redirect_uri: str | None#
- client_id: str | None = None#
- class redditwarp.auth.grants.ResourceOwnerPasswordCredentialsGrant(username: 'str', password: 'str', scope: 'Optional[str]' = None)[source]#
Bases:
AuthorizationGrant- GRANT_TYPE: ClassVar[str] = 'password'#
- username: str#
- password: str#
- scope: str | None = None#
- class redditwarp.auth.grants.ClientCredentialsGrant(scope: 'Optional[str]' = None)[source]#
Bases:
AuthorizationGrant- GRANT_TYPE: ClassVar[str] = 'client_credentials'#
- scope: str | None = None#