Class: Doorkeeper::OAuth::RefreshTokenRequest

Inherits:
Object
  • Object
show all
Includes:
Helpers, RequestConcern, Validations
Defined in:
lib/doorkeeper/oauth/refresh_token_request.rb

Instance Attribute Summary collapse

Attributes included from Validations

#error

Instance Method Summary collapse

Methods included from RequestConcern

#after_successful_response, #authorize, #find_or_create_access_token, #scopes, #valid?

Methods included from Validations

#valid?, #validate

Constructor Details

#initialize(server, refresh_token, credentials, parameters = {}) ⇒ RefreshTokenRequest

Returns a new instance of RefreshTokenRequest.


17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/doorkeeper/oauth/refresh_token_request.rb', line 17

def initialize(server, refresh_token, credentials, parameters = {})
  @server          = server
  @refresh_token   = refresh_token
  @credentials     = credentials
  @original_scopes = parameters[:scopes]
  @refresh_token_parameter = parameters[:refresh_token]

  if credentials
    @client = Application.by_uid_and_secret credentials.uid,
                                            credentials.secret
  end
end

Instance Attribute Details

#access_tokenObject

Returns the value of attribute access_token


14
15
16
# File 'lib/doorkeeper/oauth/refresh_token_request.rb', line 14

def access_token
  @access_token
end

#clientObject

Returns the value of attribute client


15
16
17
# File 'lib/doorkeeper/oauth/refresh_token_request.rb', line 15

def client
  @client
end

#credentialsObject

Returns the value of attribute credentials


14
15
16
# File 'lib/doorkeeper/oauth/refresh_token_request.rb', line 14

def credentials
  @credentials
end

#refresh_tokenObject

Returns the value of attribute refresh_token


14
15
16
# File 'lib/doorkeeper/oauth/refresh_token_request.rb', line 14

def refresh_token
  @refresh_token
end

#serverObject

Returns the value of attribute server


14
15
16
# File 'lib/doorkeeper/oauth/refresh_token_request.rb', line 14

def server
  @server
end