Class: Doorkeeper::OAuth::IdTokenRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/doorkeeper/oauth/id_token_request.rb

Direct Known Subclasses

IdTokenTokenRequest

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pre_auth, resource_owner) ⇒ IdTokenRequest

Returns a new instance of IdTokenRequest.



6
7
8
9
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 6

def initialize(pre_auth, resource_owner)
  @pre_auth       = pre_auth
  @resource_owner = resource_owner
end

Instance Attribute Details

#authObject

Returns the value of attribute auth.



4
5
6
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 4

def auth
  @auth
end

#pre_authObject

Returns the value of attribute pre_auth.



4
5
6
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 4

def pre_auth
  @pre_auth
end

#resource_ownerObject

Returns the value of attribute resource_owner.



4
5
6
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 4

def resource_owner
  @resource_owner
end

Instance Method Details

#authorizeObject



11
12
13
14
15
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 11

def authorize
  @auth = Authorization::Token.new(pre_auth, resource_owner)
  @auth.issue_token
  response
end

#denyObject



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

def deny
  pre_auth.error = :access_denied
  pre_auth.error_response
end