Class: Rack::OAuth2::Server::Abstract::Request
- Inherits:
-
Request
- Object
- Request
- Rack::OAuth2::Server::Abstract::Request
- Includes:
- AttrOptional, AttrRequired
- Defined in:
- lib/rack/oauth2/server/abstract/request.rb
Direct Known Subclasses
Instance Method Summary collapse
- #attr_missing! ⇒ Object
-
#initialize(env) ⇒ Request
constructor
A new instance of Request.
Constructor Details
#initialize(env) ⇒ Request
Returns a new instance of Request.
10 11 12 13 14 |
# File 'lib/rack/oauth2/server/abstract/request.rb', line 10 def initialize(env) super @client_id ||= params['client_id'] @scope = Array(params['scope'].to_s.split(' ')) end |
Instance Method Details
#attr_missing! ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/rack/oauth2/server/abstract/request.rb', line 16 def attr_missing! if params['client_id'].present? && @client_id != params['client_id'] invalid_request! 'Multiple client credentials are provided.' end super rescue AttrRequired::AttrMissing => e invalid_request! e., state: @state, redirect_uri: @redirect_uri end |