Apache2-Authen-Passphrase
view release on metacpan or search on metacpan
lib/Apache2/Authen/Passphrase.pm view on Meta::CPAN
$conf->{passphrase}=pwhash $pass;
$conf->{passphrase_version}=PASSPHRASE_VERSION;
DumpFile $file, $conf;
chmod 0660, $file;
}
sub pwcheck{
my ($user, $pass)=@_;
die INVALID_USER unless $user =~ USER_REGEX; ## no critic (RequireCarping)
$user=${^MATCH}; # Make taint shut up
my $conf=LoadFile "$rootdir/$user.yml";
## no critic (RequireCarping)
die BAD_PASSWORD unless keys %$conf; # Empty hash means no such user
die BAD_PASSWORD unless Authen::Passphrase->from_rfc2307($conf->{passphrase})->match($pass);
## use critic
pwset $user, $pass if $conf->{passphrase_version} < PASSPHRASE_VERSION
}
sub handler{
( run in 0.261 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )