Class: Oauth2CallbackFilter

Inherits:
Object
  • Object
show all
Defined in:
lib/oauth2_callback_filter.rb

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ Oauth2CallbackFilter

Returns a new instance of Oauth2CallbackFilter.



2
3
4
# File 'lib/oauth2_callback_filter.rb', line 2

def initialize(app)
  @app = app
end

Instance Method Details

#call(env) ⇒ Object



6
7
8
9
10
11
# File 'lib/oauth2_callback_filter.rb', line 6

def call(env)
  unless env["rack.session"][:oauth2_callback_method].blank?
    env["REQUEST_METHOD"] = env["rack.session"].delete(:oauth2_callback_method).to_s.upcase
  end
  @app.call(env)
end