[Catalyst-commits] r6560 - in trunk/Catalyst-Plugin-Authentication:
. lib/Catalyst/Plugin/Authentication/Credential
matthewt at dev.catalyst.perl.org
matthewt at dev.catalyst.perl.org
Tue Jul 17 17:59:13 GMT 2007
Author: matthewt
Date: 2007-07-17 17:59:13 +0100 (Tue, 17 Jul 2007)
New Revision: 6560
Modified:
trunk/Catalyst-Plugin-Authentication/
trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm
Log:
r42000 at cain (orig r6285): jayk | 2007-04-14 03:10:47 +0000
Adding 'None' option to password_type - allowing 'retrieve only' authentication
Property changes on: trunk/Catalyst-Plugin-Authentication
___________________________________________________________________
Name: svk:merge
- 4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Plugin-Authentication:6171
+ 4ad37cd2-5fec-0310-835f-b3785c72a374:/branches/Catalyst-Plugin-Authentication:6285
Modified: trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm
===================================================================
--- trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm 2007-07-17 16:59:09 UTC (rev 6559)
+++ trunk/Catalyst-Plugin-Authentication/lib/Catalyst/Plugin/Authentication/Credential/Password.pm 2007-07-17 16:59:13 UTC (rev 6560)
@@ -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