Net::LDAP Methods
Net::LDAP implements the following methods:
new (host[, %options])new( )creates a new Net::LDAP object and opens a connection tohost.%optionsinclude:portPort to connect to on the remote server.
timeoutThe maximum time that Net::LDAP will take to connect to a host. The default is 120 seconds.
debugShows details of the conversion between Net::LDAP and the directory server.
asyncPerforms asynchronous entry retrieval so that search results are returned to the client as they are identified:
$ldap = Net::LDAP->new('ldap.my.domain', async => 1);onerrorIf set to true, and if
asyncis also true, then Net::LDAP will check for errors on all methods. If an error exists in the resulting data, then one of the following actions will be taken:die( ),warn( ),undef.CODEREFCalls the given coderef in a scalar context with the result message as the argument.
version( )Sets the version of the LDAP protocol to use. Values are
LDAPv2(default) andLDAPv3.
bind(dn[, %options])Binds to the server that’s contained in the connection handle.
dnis the DN to bind as. You’ll end up binding anonymously if you callbind( )without any arguments.As for
%options, you should give no more than one of the following:noauthDo not attempt to authenticate at all.
anonymousBinds without any password; the value passed with this option is ignored. This is the default if no arguments are given.
passwordBinds with the given password.
saslBinds using an SASL mechanism. The argument given should be a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access