Class: Basecamp::Oauth::RefreshRequest
- Inherits:
-
Data
- Object
- Data
- Basecamp::Oauth::RefreshRequest
- Defined in:
- lib/basecamp/oauth/refresh_request.rb
Overview
Parameters for refreshing an access token.
Instance Attribute Summary collapse
-
#client_id ⇒ String?
readonly
The client identifier (optional).
-
#client_secret ⇒ String?
readonly
The client secret (optional).
-
#refresh_token ⇒ String
readonly
The refresh token.
-
#resource ⇒ String?
readonly
RFC 8707 resource indicator to bind the refreshed token to, sent only when set.
-
#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:, refresh_token:, client_id: nil, client_secret: nil, use_legacy_format: false, resource: nil) ⇒ RefreshRequest
constructor
A new instance of RefreshRequest.
Constructor Details
#initialize(token_endpoint:, refresh_token:, client_id: nil, client_secret: nil, use_legacy_format: false, resource: nil) ⇒ RefreshRequest
Returns a new instance of RefreshRequest.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/basecamp/oauth/refresh_request.rb', line 24 def initialize( token_endpoint:, refresh_token:, client_id: nil, client_secret: nil, use_legacy_format: false, resource: nil ) super end |
Instance Attribute Details
#client_id ⇒ String? (readonly)
The client identifier (optional)
16 17 18 |
# File 'lib/basecamp/oauth/refresh_request.rb', line 16 def client_id @client_id end |
#client_secret ⇒ String? (readonly)
The client secret (optional)
16 17 18 |
# File 'lib/basecamp/oauth/refresh_request.rb', line 16 def client_secret @client_secret end |
#refresh_token ⇒ String (readonly)
The refresh token
16 17 18 |
# File 'lib/basecamp/oauth/refresh_request.rb', line 16 def refresh_token @refresh_token end |
#resource ⇒ String? (readonly)
RFC 8707 resource indicator to bind the refreshed token to, sent only when set. Echo the stored token's resource: BC5 multi-account refresh tokens hard-require it (SPEC ยง16). Appended last so earlier members keep their positions.
16 17 18 |
# File 'lib/basecamp/oauth/refresh_request.rb', line 16 def resource @resource end |
#token_endpoint ⇒ String (readonly)
URL of the token endpoint
16 17 18 |
# File 'lib/basecamp/oauth/refresh_request.rb', line 16 def token_endpoint @token_endpoint end |
#use_legacy_format ⇒ Boolean (readonly)
Use Launchpad's non-standard token format
16 17 18 |
# File 'lib/basecamp/oauth/refresh_request.rb', line 16 def use_legacy_format @use_legacy_format end |