Access Token#
- class AccessToken(*, token: str = '', expires: ~datetime.datetime = <factory>)[source]#
Represents a Bearer Token used for authentication.
The
AccessTokenclass additionally provides methods to check the token’s expiration status and the time remaining before it expires.- Parameters:
token (str) – The access token string used for authentication.
expires (datetime) – The expiration datetime of the token. The default is set to January 1, 1970.