Class: Privy::Models::OAuthTokenSuccessResponse

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

Defined Under Namespace

Modules: TokenType

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(access_token:, token_type:, expires_in: nil, refresh_token: nil) ⇒ Object

Some parameter documentations has been truncated, see Privy::Models::OAuthTokenSuccessResponse for more details.

Successful token response per RFC 6749 Section 5.1.

Parameters:

  • access_token (String)

    The issued access token.

  • token_type (Symbol, Privy::Models::OAuthTokenSuccessResponse::TokenType)

    The type of token issued.

  • expires_in (Float) (defaults to: nil)

    The lifetime in seconds of the access token.

  • refresh_token (String) (defaults to: nil)

    A refresh token for obtaining new access tokens. Issued for device_code and refr



# File 'lib/privy/models/oauth_token_success_response.rb', line 31

Instance Attribute Details

#access_tokenString

The issued access token.

Returns:

  • (String)


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

required :access_token, String

#expires_inFloat?

The lifetime in seconds of the access token.

Returns:

  • (Float, nil)


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

optional :expires_in, Float

#refresh_tokenString?

A refresh token for obtaining new access tokens. Issued for device_code and refresh_token grants.

Returns:

  • (String, nil)


29
# File 'lib/privy/models/oauth_token_success_response.rb', line 29

optional :refresh_token, String

#token_typeSymbol, Privy::Models::OAuthTokenSuccessResponse::TokenType

The type of token issued.



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

required :token_type, enum: -> { Privy::OAuthTokenSuccessResponse::TokenType }