2015-04-24 11:03:18 -04:00
|
|
|
# Protects OmniAuth request phase against CSRF.
|
|
|
|
|
|
|
|
module OmniAuth
|
2015-12-08 08:41:19 -05:00
|
|
|
module RequestForgeryProtection
|
|
|
|
class Controller < ActionController::Base
|
|
|
|
protect_from_forgery with: :exception
|
2015-04-24 11:03:18 -04:00
|
|
|
|
2015-12-08 08:41:19 -05:00
|
|
|
def index
|
|
|
|
head :ok
|
2015-04-24 11:03:18 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-12-08 08:41:19 -05:00
|
|
|
def self.app
|
|
|
|
@app ||= Controller.action(:index)
|
2015-04-24 11:03:18 -04:00
|
|
|
end
|
|
|
|
|
2015-12-08 08:41:19 -05:00
|
|
|
def self.call(env)
|
|
|
|
app.call(env)
|
2015-04-24 11:03:18 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|