Token
This class represents an authentication token used for securing API requests. It defines the structure for a bearer token, including the access token string and the token type.
Attributes
| Attribute | Type | Description |
|---|---|---|
| access_token | str | The encoded string used as a credential to authenticate requests to protected resources. |
| token_type | str = bearer | The type of the issued token, typically set to 'bearer' to indicate how the access token should be utilized in authorization headers. |
Constructor
Signature
def Token(
access_token: str,
token_type: str = bearer
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| access_token | str | The string representing the access token. |
| token_type | str = bearer | The type of the token, defaulting to bearer. |
Signature
def Token(
access_token: str,
token_type: str = bearer
) - > null
Parameters
| Name | Type | Description |
|---|---|---|
| access_token | str | The encoded JWT string used for authenticating subsequent API requests |
| token_type | str = bearer | The type of token issued, typically 'bearer' as per OAuth2 standards |