Class: OauthCallbackFilter

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

Instance Method Summary collapse

Constructor Details

#initialize(app) ⇒ OauthCallbackFilter

Returns a new instance of OauthCallbackFilter.



2
3
4
# File 'lib/oauth_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/oauth_callback_filter.rb', line 6

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