Class: Rack::Auth::WRAP::Request
- Inherits:
-
AbstractRequest
- Object
- AbstractRequest
- Rack::Auth::WRAP::Request
- Defined in:
- lib/rack/auth/wrap.rb
Overview
Internal class used to parse the current request based on the enviroment parameters.
Instance Method Summary collapse
-
#initialize(env) ⇒ Request
constructor
A new instance of Request.
-
#is_wrap? ⇒ Boolean
Returns a value indicating whether the Authentication Scheme sent by the user is WRAP.
-
#token ⇒ Object
Returns the token contained inside the access_token parameter on the Authorization header, when it’s using the WRAP Scheme.
Constructor Details
#initialize(env) ⇒ Request
Returns a new instance of Request.
62 63 64 |
# File 'lib/rack/auth/wrap.rb', line 62 def initialize(env) super(env) end |
Instance Method Details
#is_wrap? ⇒ Boolean
Returns a value indicating whether the Authentication Scheme sent by the user is WRAP.
68 69 70 |
# File 'lib/rack/auth/wrap.rb', line 68 def is_wrap? self.scheme == :wrap end |
#token ⇒ Object
Returns the token contained inside the access_token parameter on the Authorization header, when it’s using the WRAP Scheme.
74 75 76 |
# File 'lib/rack/auth/wrap.rb', line 74 def token CGI.unescape(self.params[/access_token=([^&]+)/, 1]) end |