struct

Authly::AccessToken

Inherits JSON::Serializable < Struct < Value < Object

Constructors

new(client_id : String, scope : String, id_token : String | Nil = nil, cert_thumbprint : String | Nil = nil, subject : String | Nil = nil, family : String | Nil = nil, refresh_scope : String | Nil = nil, family_expires_at : Time | Nil = nil, options : IssuanceOptions | Nil = nil)

family is the rotation family of the refresh token this one replaces (a new one when nil); refresh_scope is the scope the refresh token keeps granting (scope when nil), which stays the original one when an access token was narrowed on refresh. family_expires_at is the end of that family (a new family ends refresh_absolute_ttl from now).

Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Class methods

jwt(client_id, scope, id_token)
Source

Instance methods

access_token
Source
client_id
Source
expires_at

Absolute expiry as a Unix timestamp (the exp claim).

Source
expires_in

Lifetime in seconds, as RFC 6749 section 5.1 defines expires_in.

Source
id_token
Source
jti

The JWT ID (jti), used to track and revoke individual tokens

Source
refresh_token
Source
revoked?
Source
scope
Source
sub

The subject the token was issued for: the resource owner, or the client itself for the client credentials grant. A token whose grant identifies nobody gets a random one, so that no two unrelated subjects ever share a sub.

Source
token_type
Source