Sha256: e5336a727fa4fe7376e4b2a1f0b142fcdfa851633210a0e191aa5977baf37342
Contents?: true
Size: 558 Bytes
Versions: 2
Compression:
Stored size: 558 Bytes
Contents
module Vidibus module User class CallbackApp def self.call(env) self.new.call(env) end # This is a rack endpoint user authentication. It will be called # by the consumer after requesting an authentication code. def call(env) env['warden'].authenticate!(:scope => :user) # Redirect to return path after signin return_to = env['rack.session'][:user_return_to] || '/' [302, {'Content-Type' => 'text/html', 'Location' => return_to}, ['Login successful.']] end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vidibus-user-1.0.1 | lib/vidibus/user/callback_app.rb |
vidibus-user-1.0.0 | lib/vidibus/user/callback_app.rb |