Sha256: 6f45781f86d63b8b7b0b2c9f9c1470aa1e1cac6bd0a423c876e3e7d4b092e7c7
Contents?: true
Size: 670 Bytes
Versions: 2
Compression:
Stored size: 670 Bytes
Contents
class AuthlogicConnect::CallbackFilter def initialize(app) @app = app end # this intercepts how the browser interprets the url. # so we override it and say, # "if we've stored a variable in the session called :auth_callback_method, # then convert that into a POST call so we re-call the original method" def call(env) if env["rack.session"].nil? raise "Make sure you are setting the session in Rack too! Place this in config/application.rb" end unless env["rack.session"][:auth_callback_method].blank? env["REQUEST_METHOD"] = env["rack.session"].delete(:auth_callback_method).to_s.upcase end @app.call(env) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
authlogic-connect-0.0.3.4 | lib/authlogic_connect/callback_filter.rb |
authlogic-connect-0.0.3.3 | lib/authlogic_connect/callback_filter.rb |