+ - 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.
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;
}