Skip to main content

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​

AttributeTypeDescription
access_tokenstrThe encoded string used as a credential to authenticate requests to protected resources.
token_typestr = bearerThe 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​

NameTypeDescription
access_tokenstrThe string representing the access token.
token_typestr = bearerThe type of the token, defaulting to bearer.

Signature​

def Token(
access_token: str,
token_type: str = bearer
) - > null

Parameters​

NameTypeDescription
access_tokenstrThe encoded JWT string used for authenticating subsequent API requests
token_typestr = bearerThe type of token issued, typically 'bearer' as per OAuth2 standards