Apache-TransLDAP
view release on metacpan or search on metacpan
TransLDAP.pm view on Meta::CPAN
$URI =~ s/^(.*)$//;
$user = $1;
}
if (!$user)
{
return DECLINED;
}
my $ldap = new Net::LDAPapi($LDAPSERVER,$LDAPPORT);
$ldap->bind_s;
my $filter = "($UIDATTR=$user)";
my @attrs = ($URIATTR);
if ($ldap->search_s($LDAPBASE,LDAP_SCOPE_SUBTREE,$filter,\@attrs,0)
!= LDAP_SUCCESS)
{
$r->warn("Search Failed");
$ldap->unbind;
return DECLINED;
}
if (!$ldap->first_entry)
{
$r->warn("No First Entry");
$ldap->unbind;
return DECLINED;
}
my @uris = $ldap->get_values($URIATTR);
$ldap->unbind;
if ($#uris < 0)
{
$r->warn("No labeledURIs");
return DECLINED;
}
if ($uris[0] =~ /\/$/)
{
$URI = $uris[0] . $URI;
( run in 1.684 second using v1.01-cache-2.11-cpan-2398b32b56e )