OAuth credentials. Inspection hides access/refresh tokens. Times are Unix seconds.
Summary
Types
OAuth credentials. expires_at is a Unix timestamp and expires_in is a
lifetime, both in seconds. Restored tokens can omit expires_in and
token_type.
Functions
True if the token expires within the given safety margin (default 60 seconds).
Types
@type t() :: %ExFattureincloud.OAuth.Token{ access_token: String.t(), expires_at: integer(), expires_in: pos_integer() | nil, refresh_token: String.t() | nil, token_type: String.t() | nil }
OAuth credentials. expires_at is a Unix timestamp and expires_in is a
lifetime, both in seconds. Restored tokens can omit expires_in and
token_type.
Functions
@spec expired?(t(), non_neg_integer()) :: boolean()
True if the token expires within the given safety margin (default 60 seconds).