Apache-Session-Browseable
view release on metacpan or search on metacpan
lib/Apache/Session/Browseable/LDAP.pm view on Meta::CPAN
$ldap->unbind();
if ( $msg->code ) {
Apache::Session::Browseable::Store::LDAP->logError($msg);
}
else {
foreach my $entry ( $msg->entries ) {
my $id = $entry->get_value( $args->{ldapAttributeId} ) or die;
my $tmp = $entry->get_value( $args->{ldapAttributeContent} );
next unless ($tmp);
eval { $tmp = unserialize($tmp); };
next if ($@);
if ( ref($data) eq 'CODE' ) {
$res{$id} = &$data( $tmp, $id );
}
elsif ($data) {
$data = [$data] unless ( ref($data) );
$res{$id}->{$_} = $tmp->{$_} foreach (@$data);
}
else {
$res{$id} = $tmp;
}
}
}
return \%res;
}
1;
=pod
=head1 NAME
Apache::Session::Browseable::LDAP - An implementation of Apache::Session::LDAP
=head1 SYNOPSIS
use Apache::Session::Browseable::LDAP;
tie %hash, 'Apache::Session::Browseable::LDAP', $id, {
ldapServer => 'ldap://localhost:389',
ldapConfBase => 'dmdName=applications,dc=example,dc=com',
ldapBindDN => 'cn=admin,dc=example,dc=com',
ldapBindPassword => 'pass',
Index => 'uid ipAddr',
ldapObjectClass => 'applicationProcess',
ldapAttributeId => 'cn',
ldapAttributeContent => 'description',
ldapAttributeIndex => 'ou',
ldapVerify => 'require',
ldapCAFile => '/etc/ssl/certs/ca-certificates.crt',
};
=head1 DESCRIPTION
This module is an implementation of Apache::Session. It uses an LDAP directory
to store datas.
=head1 COPYRIGHT AND LICENSE
=encoding utf8
=over
=item 2009-2025 by Xavier Guimard
=item 2013-2025 by Clément Oudot
=item 2019-2025 by Maxime Besson
=item 2013-2025 by Worteks
=item 2023-2025 by Linagora
=back
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.10.0 or,
at your option, any later version of Perl 5 you may have available.
=head1 SEE ALSO
L<Apache::Session>
=cut
( run in 0.807 second using v1.01-cache-2.11-cpan-39bf76dae61 )