use_uri_for
/);
-our $VERSION = '1.009';
+our $VERSION = '1.012';
sub new {
my ($class, $config, $app, $realm) = @_;
$config->{username_field} ||= 'username';
# _config is shity back-compat with our base class.
- my $self = { %$config, _config => $config, _debug => $app->debug };
+ my $self = { %$config, _config => $config, _debug => $app->debug ? 1 : 0 };
bless $self, $class;
$self->realm($realm);
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;
}
}
=item Peter Corlett
+=item Devin Austin (dhoss) C<dhoss@cpan.org>
+
=back
=head1 SEE ALSO