Class: AuthProxy::Callback
- Inherits:
-
Object
- Object
- AuthProxy::Callback
- Includes:
- Validator
- Defined in:
- lib/auth_proxy/callback.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(auth_options = {}, host_options = {}) ⇒ Callback
constructor
A new instance of Callback.
Methods included from Validator
#authenticated?, #rack_request, #valid_callback?, #valid_cookie?
Constructor Details
#initialize(auth_options = {}, host_options = {}) ⇒ Callback
Returns a new instance of Callback.
7 8 9 |
# File 'lib/auth_proxy/callback.rb', line 7 def initialize(={}, ={}) @auth_options = end |
Instance Method Details
#call(env) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/auth_proxy/callback.rb', line 11 def call(env) @env = env response = Rack::Response.new if valid_callback? response.('secret', {path: '/', value: }) end response.status = 301 response['location'] = rack_request.base_url + '/' response.finish end |