Sha256: 34d6a636427a594da05d3d3ef71ab4bd3606dcdb9773b79c704cc594b5c85cb1
Contents?: true
Size: 483 Bytes
Versions: 19
Compression:
Stored size: 483 Bytes
Contents
require 'rack/request' module Rack class FacebookSession FACEBOOK_SESSION_KEY = 'fb_sig_session_key' def initialize(app, session_key = '_session_id') @app = app @session_key = session_key end def call(env) req = Rack::Request.new(env) key = req.POST[FACEBOOK_SESSION_KEY] || req.GET[FACEBOOK_SESSION_KEY] env['HTTP_COOKIE'] = [ @session_key, key ].join('=').freeze unless key.nil? @app.call(env) end end end
Version data entries
19 entries across 19 versions & 7 rubygems