fix copy/paste error in auth_flat_file

correct copy/paste error, where auth_flat_file methods were named authsql in auth_flat plugin

Signed-off-by: Robert <rspier@pobox.com>
This commit is contained in:
Matt Simerson 2010-05-11 01:16:54 -04:00 committed by Robert
parent caad3444c3
commit 8b892c33ad
2 changed files with 5 additions and 5 deletions

View File

@ -35,10 +35,10 @@ use Digest::HMAC_MD5 qw(hmac_md5_hex);
sub register {
my ( $self, $qp ) = @_;
$self->register_hook("auth-cram-md5", "authsql");
$self->register_hook("auth-cram-md5", "auth_flat_file");
}
sub authsql {
sub auth_flat_file {
my ( $self, $transaction, $method, $user, $passClear, $passHash, $ticket ) =
@_;

View File

@ -2,7 +2,7 @@
sub register_tests {
my $self = shift;
$self->register_test("test_authsql", 3);
$self->register_test("test_auth_flat_file", 3);
}
my @u_list = qw ( good bad none );
@ -12,13 +12,13 @@ my %u_data = (
none => [ 'none@example.com', DECLINED, '' ],
);
sub test_authsql {
sub test_auth_flat_file {
my $self = shift;
my ($tran, $ret, $note, $u, $r, $p, $a );
$tran = $self->qp->transaction;
for $u ( @u_list ) {
( $a,$r,$p ) = @{$u_data{$u}};
($ret, $note) = $self->authsql($tran,'CRAMMD5',$a,$p);
($ret, $note) = $self->auth_flat_file($tran,'CRAMMD5',$a,$p);
defined $note or $note='No-Message';
is ($ret, $r, $note);
# - for debugging.