Home | Wiki | OI 1.x Docs | OI 2.x Docs OI logo

NAME

OpenInteract2::Datasource::LDAP - Centralized connection location to LDAP directories

SYNOPSIS

 # Define the parameters for an LDAP connection called 'primary'
 [datasource primary]
 type          = LDAP
 host          = localhost
 port          = 389
 base_dn       = dc=mycompany, dc=com
 timeout       = 120
 version       = 2
 sasl          =
 debug         =
 bind_dn       = cn=webuser, ou=People, dc=mycompany, dc=com
 bind_password = urkelnut
 perform_bind  = yes
 
 # Request the datasource 'primary' from the $OP object
 
 my $ldap = CTX->datasource( 'primary' );
 my $mesg =  $ldap->search( "urkelFan=yes" );
 ...

DESCRIPTION

Connect and/or bind to an LDAP directory.

METHODS

connect( $datasource_name, \%datasource_info )

Parameters used in \%datsource_info

Returns: a Net::LDAP connection. If there is an error we throw an exception of the OpenInteract2::Exception::Datasource variety.

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 throws an exception to explain why it failed. An OpenInteract2::Exception is thrown if a resource could not be loaded, a OpenInteract2::Exception::Datasource is thrown if we could not perform the bind.

connect_and_bind( \%connect_params, \%other_params )

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

TO DO

This hasn't been tested yet. (Got an LDAP server/setup handy?)

SEE ALSO

OpenInteract2::Exception::Datasource

Net::LDAP

COPYRIGHT

Copyright (c) 2002-2003 Chris Winters. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Chris Winters <chris@cwinters.com>

Generated from the OpenInteract 1.99_03 source.


Home | Wiki | OI 1.x Docs | OI 2.x Docs
SourceForge Logo