Class: Basecamp::Oauth::RefreshRequest

Inherits:
Data
  • Object
show all
Defined in:
lib/basecamp/oauth/refresh_request.rb

Overview

Parameters for refreshing an access token.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(token_endpoint:, refresh_token:, client_id: nil, client_secret: nil, use_legacy_format: false) ⇒ RefreshRequest

Returns a new instance of RefreshRequest.



19
20
21
22
23
24
25
26
27
# File 'lib/basecamp/oauth/refresh_request.rb', line 19

def initialize(
  token_endpoint:,
  refresh_token:,
  client_id: nil,
  client_secret: nil,
  use_legacy_format: false
)
  super
end

Instance Attribute Details

#client_idString? (readonly)

The client identifier (optional)

Returns:

  • (String, nil)

    the current value of client_id



12
13
14
# File 'lib/basecamp/oauth/refresh_request.rb', line 12

def client_id
  @client_id
end

#client_secretString? (readonly)

The client secret (optional)

Returns:

  • (String, nil)

    the current value of client_secret



12
13
14
# File 'lib/basecamp/oauth/refresh_request.rb', line 12

def client_secret
  @client_secret
end

#refresh_tokenString (readonly)

The refresh token

Returns:

  • (String)

    the current value of refresh_token



12
13
14
# File 'lib/basecamp/oauth/refresh_request.rb', line 12

def refresh_token
  @refresh_token
end

#token_endpointString (readonly)

URL of the token endpoint

Returns:

  • (String)

    the current value of token_endpoint



12
13
14
# File 'lib/basecamp/oauth/refresh_request.rb', line 12

def token_endpoint
  @token_endpoint
end

#use_legacy_formatBoolean (readonly)

Use Launchpad's non-standard token format

Returns:

  • (Boolean)

    the current value of use_legacy_format



12
13
14
# File 'lib/basecamp/oauth/refresh_request.rb', line 12

def use_legacy_format
  @use_legacy_format
end