[Catalyst-commits] r8519 - in Catalyst-Authentication-Credential-HTTP/1.000/trunk: . lib/Catalyst/Authentication/Credential

t0m at dev.catalyst.perl.org t0m at dev.catalyst.perl.org
Fri Oct 10 11:07:21 BST 2008


Author: t0m
Date: 2008-10-10 11:07:21 +0100 (Fri, 10 Oct 2008)
New Revision: 8519

Modified:
   Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes
   Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm
Log:
Warning fix

Modified: Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes
===================================================================
--- Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes	2008-10-09 21:11:08 UTC (rev 8518)
+++ Catalyst-Authentication-Credential-HTTP/1.000/trunk/Changes	2008-10-10 10:07:21 UTC (rev 8519)
@@ -1,3 +1,5 @@
+  - Fix warning when used with self_check => 1
+
 1.006  2008-10-06
   - Added username_field configuration option. I need this to play
     nice with Catalyst::Authentication::Store::Tangram.

Modified: Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm
===================================================================
--- Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm	2008-10-09 21:11:08 UTC (rev 8518)
+++ Catalyst-Authentication-Credential-HTTP/1.000/trunk/lib/Catalyst/Authentication/Credential/HTTP.pm	2008-10-10 10:07:21 UTC (rev 8519)
@@ -60,8 +60,11 @@
 
     if ( my ( $username, $password ) = $headers->authorization_basic ) {
 	    my $user_obj = $realm->find_user( { $self->_config->{username_field} => $username }, $c);
-	    if (ref($user_obj)) {            
-            if ($self->check_password($user_obj, {$self->_config->{password_field} => $password})) {
+	    if (ref($user_obj)) {
+            my $opts = {};
+            $opts->{$self->_config->{password_field}} = $password 
+                if $self->_config->{password_field};            
+            if ($self->check_password($user_obj, $opts)) {
                 $c->set_authenticated($user_obj);
                 return $user_obj;
             }




More information about the Catalyst-commits mailing list