Sha256: 14eb0c816ad1fb73abc90af998db2078bbeb4497b4006ccf0be7b7b29ebd52d5
Contents?: true
Size: 558 Bytes
Versions: 8
Compression:
Stored size: 558 Bytes
Contents
class SessionsController < ApplicationController def create auth = request.env['rack.auth'] Rails.logger.info auth.inspect unless @auth = Authorization.find_from_hash(auth) # Create a new user or add an auth to existing user, depending on # whether there is already a user signed in. @auth = Authorization.create_from_hash(auth, current_user) end # Log the authorizing user in. self.current_user = @auth.user redirect_to user_path(self.current_user), :notice => "Welcome, #{current_user.name}." end end
Version data entries
8 entries across 8 versions & 1 rubygems