Class: Rack::Auth::WRAP::Request

Inherits:
AbstractRequest
  • Object
show all
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

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.

Returns:

  • (Boolean)


68
69
70
# File 'lib/rack/auth/wrap.rb', line 68

def is_wrap?
  self.scheme == :wrap
end

#tokenObject

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