Class: Doorkeeper::OAuth::AssertionAccessTokenRequest
- Inherits:
-
Object
- Object
- Doorkeeper::OAuth::AssertionAccessTokenRequest
- Includes:
- OAuth::Helpers, OAuth::RequestConcern, Validations
- Defined in:
- lib/doorkeeper/oauth/assertion_access_token_request.rb
Instance Attribute Summary collapse
-
#access_token ⇒ Object
readonly
Returns the value of attribute access_token.
-
#client ⇒ Object
readonly
Returns the value of attribute client.
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#error_description ⇒ Object
readonly
Returns the value of attribute error_description.
-
#original_scopes ⇒ Object
Returns the value of attribute original_scopes.
-
#resource_owner ⇒ Object
readonly
Returns the value of attribute resource_owner.
-
#response ⇒ Object
readonly
Returns the value of attribute response.
-
#server ⇒ Object
Returns the value of attribute server.
Instance Method Summary collapse
- #authorize ⇒ Object
-
#initialize(server, configuration) ⇒ AssertionAccessTokenRequest
constructor
A new instance of AssertionAccessTokenRequest.
Constructor Details
#initialize(server, configuration) ⇒ AssertionAccessTokenRequest
Returns a new instance of AssertionAccessTokenRequest.
24 25 26 27 28 29 |
# File 'lib/doorkeeper/oauth/assertion_access_token_request.rb', line 24 def initialize(server, configuration) @server = server @configuration = configuration @response = nil @original_scopes = server.parameters[:scope] end |
Instance Attribute Details
#access_token ⇒ Object (readonly)
Returns the value of attribute access_token.
12 13 14 |
# File 'lib/doorkeeper/oauth/assertion_access_token_request.rb', line 12 def access_token @access_token end |
#client ⇒ Object (readonly)
Returns the value of attribute client.
12 13 14 |
# File 'lib/doorkeeper/oauth/assertion_access_token_request.rb', line 12 def client @client end |
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
12 13 14 |
# File 'lib/doorkeeper/oauth/assertion_access_token_request.rb', line 12 def configuration @configuration end |
#error_description ⇒ Object (readonly)
Returns the value of attribute error_description.
12 13 14 |
# File 'lib/doorkeeper/oauth/assertion_access_token_request.rb', line 12 def error_description @error_description end |
#original_scopes ⇒ Object
Returns the value of attribute original_scopes.
11 12 13 |
# File 'lib/doorkeeper/oauth/assertion_access_token_request.rb', line 11 def original_scopes @original_scopes end |
#resource_owner ⇒ Object (readonly)
Returns the value of attribute resource_owner.
12 13 14 |
# File 'lib/doorkeeper/oauth/assertion_access_token_request.rb', line 12 def resource_owner @resource_owner end |
#response ⇒ Object (readonly)
Returns the value of attribute response.
12 13 14 |
# File 'lib/doorkeeper/oauth/assertion_access_token_request.rb', line 12 def response @response end |
#server ⇒ Object
Returns the value of attribute server.
11 12 13 |
# File 'lib/doorkeeper/oauth/assertion_access_token_request.rb', line 11 def server @server end |
Instance Method Details
#authorize ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/doorkeeper/oauth/assertion_access_token_request.rb', line 31 def validate if valid? @response = TokenResponse.new(access_token) else @response = DescribableErrorResponse.from_request(self) @response.description = error_description @response end end |