Permalink
Browse files

hack to ensure authenticators is an array

  • Loading branch information...
1 parent 75cdbda commit f88bdd51a9e8695150109d41fd236a5c4f30bf20 @laurynasl laurynasl committed Oct 7, 2009
Showing with 8 additions and 1 deletion.
  1. +1 −0 .gitignore
  2. +7 −1 lib/casserver/controllers.rb
View
@@ -11,3 +11,4 @@ pkg
ssl
custom/*
.DS_Store
+.irbrc_history
@@ -130,10 +130,16 @@ def post
successful_authenticator = nil
begin
auth_index = 0
+
+ # hack to ensure authenticators is an array
+ authenticators = $CONF.authenticator
+ authenticators = [authenticators] unless authenticators.is_a?(Array)
+
$AUTH.each do |auth_class|
auth = auth_class.new
- auth.configure($CONF.authenticator[auth_index].merge(:auth_index => auth_index))
+ #auth.configure($CONF.authenticator[auth_index].merge(:auth_index => auth_index))
+ auth.configure(authenticators[auth_index].merge(:auth_index => auth_index))
credentials_are_valid = auth.validate(
:username => @username,

0 comments on commit f88bdd5

Please sign in to comment.