AccessTokenInfo Class

Information about an OAuth access token.

This class is an alternative to AccessToken which provides additional information about the token.

Inheritance
builtins.object
AccessTokenInfo

Constructor

AccessTokenInfo(token: str, expires_on: int, *, token_type: str = 'Bearer', refresh_on: int | None = None)

Parameters

Name Description
token
Required
str

The token string.

expires_on
Required
int

The token's expiration time in Unix time.

Keyword-Only Parameters

Name Description
token_type
str

The type of access token. Defaults to 'Bearer'.

Default value: Bearer
refresh_on
int

Specifies the time, in Unix time, when the cached token should be proactively refreshed. Optional.

Attributes

expires_on

The token's expiration time in Unix time.

expires_on: int

refresh_on

Specifies the time, in Unix time, when the cached token should be proactively refreshed. Optional.

refresh_on: int | None

token

The token string.

token: str

token_type

The type of access token.

token_type: str