Apache-AuthDigest
view release on metacpan or search on metacpan
contrib/AuthDigestDBI.pm view on Meta::CPAN
# if not configured decline
unless ($Attr->{pwd_table} && $Attr->{uid_field} && $Attr->{grp_field}) {
printf STDERR "$prefix not configured, return DECLINED\n" if $Apache::AuthDigestDBI::DEBUG > 1;
return DECLINED;
}
# do we want Windows-like case-insensitivity?
$user_sent = lc($user_sent) if $Attr->{uidcasesensitive} eq "off";
# select code to return if authorization is denied:
my $authz_denied= $Attr->{expeditive} eq 'on' ? FORBIDDEN : AUTH_REQUIRED;
# check if requirements exists
my ($ary_ref) = $r->requires;
unless ($ary_ref) {
if ($Attr->{authoritative} eq 'on') {
$r->log_reason("user $user_sent denied, no access rules specified (DBI-Authoritative)", $r->uri);
$r->note_basic_auth_failure if $authz_denied == AUTH_REQUIRED;
return $authz_denied;
}
printf STDERR "$prefix no requirements and not authoritative, return DECLINED\n" if $Apache::AuthDigestDBI::DEBUG > 1;
( run in 0.673 second using v1.01-cache-2.11-cpan-de7293f3b23 )