[Catalyst-commits] r6285 - branches/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential

jayk at dev.catalyst.perl.org jayk at dev.catalyst.perl.org
Sat Apr 14 04:10:48 GMT 2007


Author: jayk
Date: 2007-04-14 04:10:47 +0100 (Sat, 14 Apr 2007)
New Revision: 6285

Modified:
   branches/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm
Log:
Adding 'None' option to password_type - allowing 'retrieve only' authentication


Modified: branches/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm
===================================================================
--- branches/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm	2007-04-10 14:20:25 UTC (rev 6284)
+++ branches/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm	2007-04-14 03:10:47 UTC (rev 6285)
@@ -60,9 +60,11 @@
         my $password = $authinfo->{$self->_config->{'password_field'}};
         my $storedpassword = $user->get($self->_config->{'password_field'});
         
-        if ($self->_config->{password_type} eq 'clear') {
+        if ($self->_config->{'password_type'} eq 'none') {
+            return 1;
+        } elsif ($self->_config->{'password_type'} eq 'clear') {
             return $password eq $storedpassword;
-        }  elsif ($self->_config->{'password_type'} eq 'crypted') {            
+        } elsif ($self->_config->{'password_type'} eq 'crypted') {            
             return $storedpassword eq crypt( $password, $storedpassword );
         } elsif ($self->_config->{'password_type'} eq 'salted_hash') {
             require Crypt::SaltedHash;
@@ -283,6 +285,12 @@
 
 =over 8
 
+=item none
+
+No password check is done. An attempt is made to retrieve the user based on
+the information provided in the $c->authenticate() call. If a user is found, 
+authentication is considered to be successful.
+
 =item clear
 
 The password in user is in clear text and will be compared directly.




More information about the Catalyst-commits mailing list