Class: Doorkeeper::DeviceAuthorizationGrant::OAuth::DeviceCodeRequest
- Inherits:
-
OAuth::BaseRequest
- Object
- OAuth::BaseRequest
- Doorkeeper::DeviceAuthorizationGrant::OAuth::DeviceCodeRequest
- Defined in:
- lib/doorkeeper/device_authorization_grant/oauth/device_code_request.rb
Overview
Doorkeeper request object for handling OAuth 2.0 Device Access Token Requests.
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#client ⇒ Object
Returns the value of attribute client.
- #device_grant ⇒ DeviceGrant
-
#server ⇒ Object
Returns the value of attribute server.
Instance Method Summary collapse
- #before_successful_response ⇒ Object
-
#initialize(server, client, device_grant) ⇒ DeviceCodeRequest
constructor
A new instance of DeviceCodeRequest.
Constructor Details
#initialize(server, client, device_grant) ⇒ DeviceCodeRequest
Returns a new instance of DeviceCodeRequest.
21 22 23 24 25 26 27 28 29 |
# File 'lib/doorkeeper/device_authorization_grant/oauth/device_code_request.rb', line 21 def initialize(server, client, device_grant) super() @server = server @client = client @device_grant = device_grant @grant_type = Doorkeeper::DeviceAuthorizationGrant::OAuth::DEVICE_CODE end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
10 11 12 |
# File 'lib/doorkeeper/device_authorization_grant/oauth/device_code_request.rb', line 10 def access_token @access_token end |
#client ⇒ Object
Returns the value of attribute client.
10 11 12 |
# File 'lib/doorkeeper/device_authorization_grant/oauth/device_code_request.rb', line 10 def client @client end |
#device_grant ⇒ DeviceGrant
13 14 15 |
# File 'lib/doorkeeper/device_authorization_grant/oauth/device_code_request.rb', line 13 def device_grant @device_grant end |
#server ⇒ Object
Returns the value of attribute server.
10 11 12 |
# File 'lib/doorkeeper/device_authorization_grant/oauth/device_code_request.rb', line 10 def server @server end |
Instance Method Details
#before_successful_response ⇒ Object
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/doorkeeper/device_authorization_grant/oauth/device_code_request.rb', line 31 def before_successful_response check_grant_errors! check_user_interaction! device_grant.transaction do device_grant.lock! device_grant.destroy! generate_access_token end super end |