WeaviateEx.Auth.OIDC.TokenResponse (WeaviateEx v0.7.4)
View SourceOIDC token response from token endpoint.
Summary
Functions
Check if the token is expired.
Calculate the expiration timestamp from issued_at and expires_in.
Check if the token will expire within the given buffer time (in seconds). Default buffer is 60 seconds.
Types
@type t() :: %WeaviateEx.Auth.OIDC.TokenResponse{ access_token: String.t() | nil, expires_in: non_neg_integer() | nil, id_token: String.t() | nil, issued_at: DateTime.t() | nil, refresh_token: String.t() | nil, scope: String.t() | nil, token_type: String.t() | nil }
Functions
Check if the token is expired.
@spec expires_at(t()) :: DateTime.t() | nil
Calculate the expiration timestamp from issued_at and expires_in.
@spec expiring_soon?(t(), non_neg_integer()) :: boolean()
Check if the token will expire within the given buffer time (in seconds). Default buffer is 60 seconds.