Class: Doorkeeper::OAuth::PasswordAccessTokenRequest

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

Instance Attribute Summary collapse

Attributes inherited from BaseRequest

#grant_type, #server

Attributes included from Validations

#error

Instance Method Summary collapse

Methods inherited from BaseRequest

#after_successful_response, #authorize, #find_or_create_access_token, #scopes

Methods included from Validations

#valid?, #validate

Constructor Details

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

Returns a new instance of PasswordAccessTokenRequest.



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

def initialize(server, client, credentials, resource_owner, parameters = {})
  @server          = server
  @resource_owner  = resource_owner
  @client          = client
  @credentials     = credentials
  @parameters      = parameters
  @original_scopes = parameters[:scope]
  @grant_type      = Doorkeeper::OAuth::PASSWORD
end

Instance Attribute Details

#access_tokenObject (readonly)

Returns the value of attribute access_token.



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

def access_token
  @access_token
end

#clientObject (readonly)

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 (readonly)

Returns the value of attribute credentials.



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

def credentials
  @credentials
end

#parametersObject (readonly)

Returns the value of attribute parameters.



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

def parameters
  @parameters
end

#resource_ownerObject (readonly)

Returns the value of attribute resource_owner.



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

def resource_owner
  @resource_owner
end