lib/vidibus/user/callback_app.rb in vidibus-user-0.0.10 vs lib/vidibus/user/callback_app.rb in vidibus-user-1.0.0
- old
+ new
@@ -3,17 +3,17 @@
class CallbackApp
def self.call(env)
self.new.call(env)
end
- # This is just a rack endpoint for Connector authentication. It will be called
- # by the Connector after requesting an authentication code.
+ # 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)
+ 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."]]
+ return_to = env['rack.session'][:user_return_to] || '/'
+ [302, {'Content-Type' => 'text/html', 'Location' => return_to}, ['Login successful.']]
end
end
end
end