Module LDAP
In: conn.c
ldap.c
lib/ldap/control.rb
lib/ldap/ldif.rb
lib/ldap/schema.rb

The LDAP module encapsulates the various LDAP-related classes in their own namespace.

Methods

dn2ufn   entry2hash   err2string   hash2mods   mod  

Classes and Modules

Module LDAP::LDIF
Class LDAP::Conn
Class LDAP::Control
Class LDAP::Entry
Class LDAP::Error
Class LDAP::InvalidDataError
Class LDAP::InvalidEntryError
Class LDAP::Mod
Class LDAP::Record
Class LDAP::ResultError
Class LDAP::SSLConn
Class LDAP::Schema

Constants

LDAP_VERSION = INT2NUM (LDAP_VERSION)
LDAP_VERSION1 = INT2NUM (LDAP_VERSION1)
LDAP_VERSION2 = INT2NUM (LDAP_VERSION2)
LDAP_VERSION3 = INT2NUM (LDAP_VERSION3)
LDAP_VERSION_MAX = INT2NUM (LDAP_VERSION_MAX)
LDAP_VERSION_MAX = INT2NUM (LDAP_VERSION)
VERSION = rb_tainted_str_new2 (RB_LDAP_VERSION)
MAJOR_VERSION = INT2NUM (RB_LDAP_MAJOR_VERSION)
MINOR_VERSION = INT2NUM (RB_LDAP_MINOR_VERSION)
PATCH_VERSION = INT2NUM (RB_LDAP_PATCH_VERSION)
LDAP_API_INFO_VERSION = INT2NUM (LDAP_API_INFO_VERSION)
LDAP_API_INFO_VERSION = Qnil
LDAP_VENDOR_VERSION = INT2NUM (LDAP_VENDOR_VERSION)
LDAP_VENDOR_VERSION = Qnil
LDAP_VENDOR_NAME = rb_tainted_str_new2 (LDAP_VENDOR_NAME)
LDAP_VENDOR_NAME = Qnil
LDAP_API_VERSION = INT2NUM (LDAP_API_VERSION)
LDAP_API_VERSION = Qnil
LDAP_PORT = INT2NUM (389)
LDAPS_PORT = INT2NUM (636)
LDAP_CONTROL_PAGEDRESULTS = rb_str_new2 (LDAP_CONTROL_PAGEDRESULTS)

Public Instance methods

Translate the DN, dn, to a more User-Friendly Name (UFN).

For example:

LDAP.dn2ufn(‘uid=ianmacd,ou=People,dc=google,dc=com’)

produces:

ianmacd, People, google.com

The UFN format is described in RFC1781.

Convert the entry, entry, to a hash.

Return the text string associated with the LDAP error, err.

Convert a hash into an array of LDAP::Mod objects. mod_type should contain the mod type, which is most commonly LDAP_MOD_ADD, LDAP_MOD_REPLACE or LDAP_MOD_DELETE, although some LDAP servers may offer extension types.

Create a new LDAP::Mod object of type, mod_type. This is most commonly LDAP_MOD_ADD, LDAP_MOD_REPLACE or LDAP_MOD_DELETE, although some LDAP servers may offer extension types.

attr should be the name of the attribute on which to operate, whilst vals is an array of values pertaining to attr. If vals contains binary data, mod_type should be logically OR‘ed (|) with LDAP_MOD_BVALUES.

LDAP::Mod objects can be passed to methods in the LDAP::Conn class, such as Conn#add, Conn#add_ext, Conn#modify and Conn#modify_ext.

[Validate]