Class: Doorkeeper::OAuth::AuthorizationCodeRequest

Inherits:
BaseRequest
  • Object
show all
Defined in:
lib/doorkeeper/oauth/authorization_code_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, grant, client, parameters = {}) ⇒ AuthorizationCodeRequest

A scope parameter is deliberately not read here: RFC 6749 does not define one for the authorization_code token request (§4.1.3), so it is ignored and the access token inherits the scopes of the grant.



23
24
25
26
27
28
29
30
31
32
# File 'lib/doorkeeper/oauth/authorization_code_request.rb', line 23

def initialize(server, grant, client, parameters = {})
  super()
  @server = server
  @client = client
  @grant  = grant
  @grant_type = Doorkeeper::OAuth::AUTHORIZATION_CODE
  @redirect_uri = parameters[:redirect_uri]
  @code_verifier = parameters[:code_verifier]
  @raw_resource_indicators = parameters[:resource]
end

Instance Attribute Details

#access_tokenObject (readonly)

Returns the value of attribute access_token.



17
18
19
# File 'lib/doorkeeper/oauth/authorization_code_request.rb', line 17

def access_token
  @access_token
end

#clientObject (readonly)

Returns the value of attribute client.



17
18
19
# File 'lib/doorkeeper/oauth/authorization_code_request.rb', line 17

def client
  @client
end

#code_verifierObject (readonly)

Returns the value of attribute code_verifier.



17
18
19
# File 'lib/doorkeeper/oauth/authorization_code_request.rb', line 17

def code_verifier
  @code_verifier
end

#grantObject (readonly)

Returns the value of attribute grant.



17
18
19
# File 'lib/doorkeeper/oauth/authorization_code_request.rb', line 17

def grant
  @grant
end

#invalid_request_reasonObject (readonly)

Returns the value of attribute invalid_request_reason.



17
18
19
# File 'lib/doorkeeper/oauth/authorization_code_request.rb', line 17

def invalid_request_reason
  @invalid_request_reason
end

#missing_paramObject (readonly)

Returns the value of attribute missing_param.



17
18
19
# File 'lib/doorkeeper/oauth/authorization_code_request.rb', line 17

def missing_param
  @missing_param
end

#redirect_uriObject (readonly)

Returns the value of attribute redirect_uri.



17
18
19
# File 'lib/doorkeeper/oauth/authorization_code_request.rb', line 17

def redirect_uri
  @redirect_uri
end