Class: Basecamp::Oauth::ExchangeRequest
- Inherits:
-
Data
- Object
- Data
- Basecamp::Oauth::ExchangeRequest
- Defined in:
- lib/basecamp/oauth/exchange_request.rb
Overview
Parameters for exchanging an authorization code for tokens.
Instance Attribute Summary collapse
-
#client_id ⇒ String
readonly
The client identifier.
-
#client_secret ⇒ String?
readonly
The client secret (optional for public clients).
-
#code ⇒ String
readonly
The authorization code received from the authorization server.
-
#code_verifier ⇒ String?
readonly
PKCE code verifier (optional).
-
#redirect_uri ⇒ String
readonly
The redirect URI used in the authorization request.
-
#token_endpoint ⇒ String
readonly
URL of the token endpoint.
-
#use_legacy_format ⇒ Boolean
readonly
Use Launchpad's non-standard token format.
Instance Method Summary collapse
-
#initialize(token_endpoint:, code:, redirect_uri:, client_id:, client_secret: nil, code_verifier: nil, use_legacy_format: false) ⇒ ExchangeRequest
constructor
A new instance of ExchangeRequest.
Constructor Details
#initialize(token_endpoint:, code:, redirect_uri:, client_id:, client_secret: nil, code_verifier: nil, use_legacy_format: false) ⇒ ExchangeRequest
Returns a new instance of ExchangeRequest.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/basecamp/oauth/exchange_request.rb', line 23 def initialize( token_endpoint:, code:, redirect_uri:, client_id:, client_secret: nil, code_verifier: nil, use_legacy_format: false ) super end |
Instance Attribute Details
#client_id ⇒ String (readonly)
The client identifier
14 15 16 |
# File 'lib/basecamp/oauth/exchange_request.rb', line 14 def client_id @client_id end |
#client_secret ⇒ String? (readonly)
The client secret (optional for public clients)
14 15 16 |
# File 'lib/basecamp/oauth/exchange_request.rb', line 14 def client_secret @client_secret end |
#code ⇒ String (readonly)
The authorization code received from the authorization server
14 15 16 |
# File 'lib/basecamp/oauth/exchange_request.rb', line 14 def code @code end |
#code_verifier ⇒ String? (readonly)
PKCE code verifier (optional)
14 15 16 |
# File 'lib/basecamp/oauth/exchange_request.rb', line 14 def code_verifier @code_verifier end |
#redirect_uri ⇒ String (readonly)
The redirect URI used in the authorization request
14 15 16 |
# File 'lib/basecamp/oauth/exchange_request.rb', line 14 def redirect_uri @redirect_uri end |
#token_endpoint ⇒ String (readonly)
URL of the token endpoint
14 15 16 |
# File 'lib/basecamp/oauth/exchange_request.rb', line 14 def token_endpoint @token_endpoint end |
#use_legacy_format ⇒ Boolean (readonly)
Use Launchpad's non-standard token format
14 15 16 |
# File 'lib/basecamp/oauth/exchange_request.rb', line 14 def use_legacy_format @use_legacy_format end |