Allow AuthMethod subclass authenticate() methods to update lasterr.

This commit is contained in:
Chris 2012-03-12 15:20:35 +00:00
parent fd5fe03f8d
commit c61c16193c

View File

@ -189,7 +189,7 @@ sub valid_user {
my $methodimpl = $self -> {"methods"} -> load_method($authmethod);
# Check whether the user can authenticate if the implementation was found
$valid = $methodimpl -> authenticate($username, $password)
$valid = $methodimpl -> authenticate($username, $password, $self)
if($methodimpl);
}
@ -203,7 +203,7 @@ sub valid_user {
foreach $authmethod (@{$methods}) {
my $methodimpl = $self -> {"methods"} -> load_method($authmethod);
$valid = $methodimpl -> authenticate($username, $password)
$valid = $methodimpl -> authenticate($username, $password, $self)
if($methodimpl);
# If an auth method says the user is valid, stop immediately
@ -228,7 +228,6 @@ sub valid_user {
}
# ============================================================================
# Error functions