Improved error handling.

This commit is contained in:
Martin Edenhofer 2013-05-06 00:47:58 +02:00
parent 65d9f58ebe
commit 9675dbfe22

View file

@ -75,6 +75,7 @@ class User < ApplicationModel
# try to login against configure auth backends
user_auth = nil
config.each {|config_item|
next if !config_item[:adapter]
file = "auth/#{config_item[:adapter]}"
require file
user_auth = Auth.const_get("#{config_item[:adapter].to_s.upcase}").check( username, password, config_item, user )
@ -124,6 +125,7 @@ class User < ApplicationModel
# try to login against configure auth backends
user_auth = nil
config.each {|config_item|
next if !config_item[:adapter]
file = "sso/#{config_item[:adapter]}"
require file
user_auth = SSO.const_get("#{config_item[:adapter].to_s.upcase}").check( params, config_item )