class UserSessionsController < ApplicationController
before_filter :require_auth_scope, :only => [ :destroy ]
class UserSessionsController < ApplicationController
before_filter :require_auth_scope, :only => [ :destroy ]
unless identity_url_ok
# Whoa. This should never happen.
logger.error "UserSessionsController.create: omniauth object missing/invalid"
unless identity_url_ok
# Whoa. This should never happen.
logger.error "UserSessionsController.create: omniauth object missing/invalid"
:first_name => omniauth['info']['first_name'],
:last_name => omniauth['info']['last_name'],
:identity_url => omniauth['info']['identity_url'],
:first_name => omniauth['info']['first_name'],
:last_name => omniauth['info']['last_name'],
:identity_url => omniauth['info']['identity_url'],
- :is_active => Rails.configuration.new_users_are_active)
+ :is_active => Rails.configuration.new_users_are_active,
+ :owner_uuid => system_user_uuid)
+ act_as_system_user do
+ user.save or raise Exception.new(user.errors.messages)
+ end
end
# login - Just bounce to /auth/joshid. The only purpose of this function is
# to save the return_to parameter (if it exists; see the application
# controller). /auth/joshid bypasses the application controller.
def login
end
# login - Just bounce to /auth/joshid. The only purpose of this function is
# to save the return_to parameter (if it exists; see the application
# controller). /auth/joshid bypasses the application controller.
def login
if current_user and params[:return_to]
# Already logged in; just need to send a token to the requesting
# API client.
if current_user and params[:return_to]
# Already logged in; just need to send a token to the requesting
# API client.