Class: Doorkeeper::OAuth::PasswordAccessTokenRequest

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

Instance Attribute Summary collapse

Attributes included from Validations

#error

Instance Method Summary collapse

Methods included from RequestConcern

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

Methods included from Validations

#valid?, #validate

Constructor Details

#initialize(server, credentials, resource_owner, parameters = {}) ⇒ PasswordAccessTokenRequest

Returns a new instance of PasswordAccessTokenRequest.


15
16
17
18
19
20
21
22
23
24
25
# File 'lib/doorkeeper/oauth/password_access_token_request.rb', line 15

def initialize(server, credentials, resource_owner, parameters = {})
  @server          = server
  @resource_owner  = resource_owner
  @credentials     = credentials
  @original_scopes = parameters[:scope]

  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


12
13
14
# File 'lib/doorkeeper/oauth/password_access_token_request.rb', line 12

def access_token
  @access_token
end

#clientObject

Returns the value of attribute client


13
14
15
# File 'lib/doorkeeper/oauth/password_access_token_request.rb', line 13

def client
  @client
end

#credentialsObject

Returns the value of attribute credentials


12
13
14
# File 'lib/doorkeeper/oauth/password_access_token_request.rb', line 12

def credentials
  @credentials
end

#resource_ownerObject

Returns the value of attribute resource_owner


12
13
14
# File 'lib/doorkeeper/oauth/password_access_token_request.rb', line 12

def resource_owner
  @resource_owner
end

#serverObject

Returns the value of attribute server


12
13
14
# File 'lib/doorkeeper/oauth/password_access_token_request.rb', line 12

def server
  @server
end