Class: Privy::Models::OAuthGrant

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/oauth_grant.rb

Defined Under Namespace

Modules: GrantType

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, created_at:, grant_type:, last_used_at:) ⇒ Object

An active OAuth grant representing an authorized session.

Parameters:

  • id (String)

    The grant identifier.

  • created_at (Time)

    When the grant was first created.

  • grant_type (Symbol, Privy::Models::OAuthGrant::GrantType)

    The OAuth grant type that created this grant.

  • last_used_at (Time)

    When the grant was last used (e.g. token refreshed).



# File 'lib/privy/models/oauth_grant.rb', line 30

Instance Attribute Details

#created_atTime

When the grant was first created.

Returns:

  • (Time)


16
# File 'lib/privy/models/oauth_grant.rb', line 16

required :created_at, Time

#grant_typeSymbol, Privy::Models::OAuthGrant::GrantType

The OAuth grant type that created this grant.



22
# File 'lib/privy/models/oauth_grant.rb', line 22

required :grant_type, enum: -> { Privy::OAuthGrant::GrantType }

#idString

The grant identifier.

Returns:

  • (String)


10
# File 'lib/privy/models/oauth_grant.rb', line 10

required :id, String

#last_used_atTime

When the grant was last used (e.g. token refreshed).

Returns:

  • (Time)


28
# File 'lib/privy/models/oauth_grant.rb', line 28

required :last_used_at, Time