OpenInteract::LDAP - Centralized connection location to LDAP directories


OpenInteract documentation  | view source Contained in the OpenInteract distribution.

Index


NAME

Top

OpenInteract::LDAP - Centralized connection location to LDAP directories

SYNOPSIS

Top

 # Get a connection to the LDAP directory using the 'main' parameters
 # from your server configuration

 my $ldap = eval { OpenInteract::LDAP->connect( $CONFIG->{ldap_info}{main} ) };
 if ( $@ ) {
    die "Cannot connect to directory: $@";
 }

 # Bind the connection using the same parameters

 eval { OpenInteract::LDAP->bind( $ldap, $CONFIG->{ldap_info}{main} ) };
 if ( $@ ) {
    die "Cannot bind to directory: $@";
 }

 # Do both at once with the same information
 my $ldap = eval { OpenInteract::LDAP->connect_and_bind(
                                             $CONFIG->{ldap_info}{main} ) };
 if ( $@ ) {
    die "LDAP connect/bind error: $@";
 }

DESCRIPTION

Top

Connect and/or bind to an LDAP directory.

METHODS

Top

connect( \%connect_params, \%other_params )

Parameters used:

Returns: valid Net::LDAP connection handle, or issues a die explaining why it failed.

bind( $ldap_connection, \%bind_params )

Bind an LDAP connection using a DN/password combination. With many servers, you can do this more than once with a single connection.

Parameters used:

Returns: LDAP handle with bind() run, or calls die to explain why it failed.

connect_and_bind( \%connect_params, \%other_params )

Run both the connect() and bind() methods.

BUGS

Top

None known.

TO DO

Top

Nothing known.

SEE ALSO

Top

Net::LDAP

COPYRIGHT

Top

AUTHORS

Top

Chris Winters <chris@cwinters.com>


OpenInteract documentation  | view source Contained in the OpenInteract distribution.