Class: Privy::Models::OAuthTokenAuthorizationCodeRequestBody

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/privy/models/oauth_token_authorization_code_request_body.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(code:, grant_type:, client_id: nil, client_secret: nil, redirect_uri: nil) ⇒ Object

Request body for the authorization_code grant type.

Parameters:

  • code (String)

    The authorization code received from the authorization endpoint.

  • grant_type (Symbol, Privy::Models::OAuthTokenAuthorizationCodeRequestBody::GrantType)
  • client_id (String) (defaults to: nil)

    The client ID. Alternative to Basic auth header.

  • client_secret (String) (defaults to: nil)

    The client secret. Alternative to Basic auth header.

  • redirect_uri (String) (defaults to: nil)

    The redirect URI used in the authorization request.



# File 'lib/privy/models/oauth_token_authorization_code_request_body.rb', line 35

Instance Attribute Details

#client_idString?

The client ID. Alternative to Basic auth header.

Returns:

  • (String, nil)


21
# File 'lib/privy/models/oauth_token_authorization_code_request_body.rb', line 21

optional :client_id, String

#client_secretString?

The client secret. Alternative to Basic auth header.

Returns:

  • (String, nil)


27
# File 'lib/privy/models/oauth_token_authorization_code_request_body.rb', line 27

optional :client_secret, String

#codeString

The authorization code received from the authorization endpoint.

Returns:

  • (String)


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

required :code, String

#grant_typeSymbol, Privy::Models::OAuthTokenAuthorizationCodeRequestBody::GrantType



15
# File 'lib/privy/models/oauth_token_authorization_code_request_body.rb', line 15

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

#redirect_uriString?

The redirect URI used in the authorization request.

Returns:

  • (String, nil)


33
# File 'lib/privy/models/oauth_token_authorization_code_request_body.rb', line 33

optional :redirect_uri, String