Apache-AuthNetLDAP
view release on metacpan or search on metacpan
AuthNetLDAP.pm view on Meta::CPAN
if ($password eq "") {
$r->note_basic_auth_failure;
MP2 ? $r->log_error("user $user: no password supplied",$r->uri) : $r->log_reason("user $user: no password supplied",$r->uri);
return MP2 ? Apache::HTTP_UNAUTHORIZED : Apache::Constants::HTTP_UNAUTHORIZED;
}
my $ldap = new Net::LDAP($ldapserver, port => $ldapport);
if (lc $start_TLS eq 'yes')
{
$ldap->start_tls(verify => 'none')
or MP2 ? $r->log_error( "Unable to start_tls", $r->uri)
: $r->log_reason("Unable to start_tls", $r->uri);
}
my $mesg;
#initial bind as user in Apache config
if ($bindpwd ne "")
{
$mesg = $ldap->bind($binddn, password=>$bindpwd);
}
( run in 1.022 second using v1.01-cache-2.11-cpan-5467b0d2c73 )