I fail.
[catagits/Catalyst-Authentication-Credential-HTTP.git] / lib / Catalyst / Authentication / Credential / HTTP.pm
index ebc3c09..dc43280 100644 (file)
@@ -71,14 +71,19 @@ sub authenticate_basic {
            my $user_obj = $realm->find_user( { $self->username_field => $username }, $c);
            if (ref($user_obj)) {
             my $opts = {};
-            $opts->{$self->password_field} = $password 
-                if $self->password_field;            
+            $opts->{$self->password_field} = $password
+                if $self->password_field;
             if ($self->check_password($user_obj, $opts)) {
                 return $user_obj;
             }
-        }
-        else {
-            $c->log->debug("Unable to locate user matching user info provided") if $c->debug;
+            else {
+                $c->log->debug("Password mismatch!") if $c->debug;
+                return;
+            }
+         }
+         else {
+             $c->log->debug("Unable to locate user matching user info provided")
+                if $c->debug;
             return;
         }
     }