An OAuth2 bearer token together with its computed expiry.
expires_at already folds in the safety margin applied by
SudregEx.Auth.fetch_token/1, so expired?/2 is a plain time comparison with
no second margin applied.
Summary
Functions
Returns true once now (default DateTime.utc_now/0) has reached or passed
the token's expires_at.
Types
@type t() :: %SudregEx.Token{access_token: String.t(), expires_at: DateTime.t()}
Functions
@spec expired?(t(), DateTime.t()) :: boolean()
Returns true once now (default DateTime.utc_now/0) has reached or passed
the token's expires_at.