Apache-AuthzUserDir
view release on metacpan or search on metacpan
AuthzUserDir.pm view on Meta::CPAN
use strict;
use Apache::Constants ':common';
$Apache::AuthzUserDir::VERSION = '0.92';
sub handler {
my $r = shift;
my $requires = $r->requires;
return OK unless $requires;
# get user's authentication credentials
my ($res, $sent_pw) = $r->get_basic_auth_pw;
return $res if $res != OK;
my $user = $r->connection->user;
unless($user and $sent_pw) {
$r->note_basic_auth_failure;
$r->log_reason("Both a username and password must be provided", $r->filename);
return AUTH_REQUIRED;
}
( run in 0.224 second using v1.01-cache-2.11-cpan-a5abf4f5562 )