Skip to content

OAuthToken

OAuth token payload used by Flet authentication flows.

Stores access/refresh token fields and expiry metadata returned by OAuth token endpoints.

Properties

Methods

  • from_json

    Deserializes a token from JSON.

  • to_json

    Serializes this token to a compact JSON string.

Properties#

access_token instance-attribute #

access_token = access_token

expires_at instance-attribute #

expires_at = expires_at

expires_in instance-attribute #

expires_in = expires_in

refresh_token instance-attribute #

refresh_token = refresh_token

scope instance-attribute #

scope = scope

token_type instance-attribute #

token_type = token_type

Methods#

from_json staticmethod #

from_json(data: str) -> OAuthToken

Deserializes a token from JSON.

Parameters:

Returns:

to_json #

to_json() -> str

Serializes this token to a compact JSON string.

Returns:

  • str

    JSON representation suitable for persistence and later hydration via from_json().