remove she-bang lines.
[catagits/Catalyst-Plugin-Authentication.git] / lib / Catalyst / Plugin / Authentication / Store / Minimal.pm
index 21738eb..91c7c13 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
 package Catalyst::Plugin::Authentication::Store::Minimal;
 
 use strict;
@@ -42,6 +40,11 @@ sub find_user {
     my $user = $self->userhash->{$id};
 
     if ( ref $user ) {
+        if (     Scalar::Util::blessed($user) 
+             and $user->isa('Catalyst::Plugin::Authentication::User::Hash') ) 
+        {
+            return $user;
+        }
         if ( ref $user eq "HASH" ) {
             $user->{id} ||= $id;
             return bless $user, "Catalyst::Plugin::Authentication::User::Hash";
@@ -121,7 +124,9 @@ authentication store.
                         realms => {
                             members => {
                                 credential => {
-                                    class => 'Password'
+                                    class => 'Password',
+                                    password_field => 'password',
+                                    password_type => 'clear'
                                 },
                                 store => {
                                     class => 'Minimal',