Class: Doorkeeper::OAuth::IdTokenRequest
- Inherits:
-
Object
- Object
- Doorkeeper::OAuth::IdTokenRequest
- Defined in:
- lib/doorkeeper/oauth/id_token_request.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#auth ⇒ Object
Returns the value of attribute auth.
-
#pre_auth ⇒ Object
Returns the value of attribute pre_auth.
-
#resource_owner ⇒ Object
Returns the value of attribute resource_owner.
Instance Method Summary collapse
- #authorize ⇒ Object
- #deny ⇒ Object
-
#initialize(pre_auth, resource_owner) ⇒ IdTokenRequest
constructor
A new instance of IdTokenRequest.
Constructor Details
#initialize(pre_auth, resource_owner) ⇒ IdTokenRequest
Returns a new instance of IdTokenRequest.
8 9 10 11 |
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 8 def initialize(pre_auth, resource_owner) @pre_auth = pre_auth @resource_owner = resource_owner end |
Instance Attribute Details
#auth ⇒ Object
Returns the value of attribute auth.
6 7 8 |
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 6 def auth @auth end |
#pre_auth ⇒ Object
Returns the value of attribute pre_auth.
6 7 8 |
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 6 def pre_auth @pre_auth end |
#resource_owner ⇒ Object
Returns the value of attribute resource_owner.
6 7 8 |
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 6 def resource_owner @resource_owner end |
Instance Method Details
#authorize ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 13 def @auth = Authorization::Token.new(pre_auth, resource_owner) if @auth.respond_to?(:issue_token!) @auth.issue_token! else @auth.issue_token end response end |
#deny ⇒ Object
23 24 25 26 |
# File 'lib/doorkeeper/oauth/id_token_request.rb', line 23 def deny pre_auth.error = :access_denied pre_auth.error_response end |