Skip to content

Models

Token

Bases: NamedTuple

Represents a token.

Attributes:

Name Type Description
access_token str

The OAuth access token.

refresh_token str

The refresh token.

token_type str

The type of token (usually "bearer").

scopes Tuple[str, ...]

Tuple of scopes granted to the token.

raw MappingProxyType[str, Any]

A shallow-frozen dictionary representing the original payload.


ValidateToken

Bases: NamedTuple

Represents a validated OAuth token response.

Attributes:

Name Type Description
client_id str

The client ID associated with the token.

login str

The login name of the user associated with the token.

scopes Tuple[str, ...]

Tuple of scopes granted to the token.

user_id str

The user ID associated with the token.

expires_in int

Number of seconds until the token expires.

raw MappingProxyType[str, Any]

A shallow-frozen dictionary representing the original payload.


ClientCredentials

Bases: NamedTuple

Represents a client credentials token.

Attributes:

Name Type Description
access_token str

The OAuth access token.

expires_in int

Number of seconds until the token expires.

token_type str

The type of token (usually "bearer").

raw MappingProxyType[str, Any]

A shallow-frozen dictionary representing the original payload.


DeviceCode

Bases: NamedTuple

Represents a device code response for device flow authentication.

Attributes:

Name Type Description
device_code str

The device code used for polling.

user_code str

The user code to be displayed to the user.

verification_uri str

The URI where the user should authenticate.

expires_in int

Number of seconds until the device code expires.

interval int

The minimum interval in seconds between polling requests.

raw MappingProxyType[str, Any]

A shallow-frozen dictionary representing the original payload.