Apache-AuthenMSAD
view release on metacpan or search on metacpan
lib/Apache/AuthenMSAD.pm view on Meta::CPAN
return Apache::Constants::HTTP_UNAUTHORIZED;
}
my $ldap = Net::LDAP->new($server, version=>3);
unless ($ldap) {
$r->note_basic_auth_failure;
$r->log_reason("user - MSAD LDAP Connect Failed",$r->uri);
return Apache::Constants::HTTP_UNAUTHORIZED;
}
my $result= $ldap->bind (dn => "$user\@$domain", password => $pass);
if (!$result || ($result && $result->code)) {
$r->note_basic_auth_failure;
$r->log_reason("user - Active Directory Authen Failed",$r->uri);
return Apache::Constants::HTTP_UNAUTHORIZED;
}
return Apache::Constants::OK;
}
( run in 2.447 seconds using v1.01-cache-2.11-cpan-2398b32b56e )