Class

LDAP URI SCHEMA (described in RFC2255) ldap://<host>/<dn>[?<attrs>[?<scope>[?<filter>]]]

Constants

A Default port of 389 for URI::LDAP

An Array of the available components for URI::LDAP

Scopes available for the starting point.

  • SCOPE_BASE - the Base DN

  • SCOPE_ONE - one level under the Base DN, not including the base DN and

    not including any entries under this.
  • SCOPE_SUB - subtress, all entries at all levels

Class Methods

Description

Create a new URI::LDAP object from components, with syntax checking.

The components accepted are host, port, dn, attributes, scope, filter, and extensions.

The components should be provided either as an Array, or as a Hash with keys formed by preceding the component names with a colon.

If an Array is used, the components must be passed in the order [host, port, dn, attributes, scope, filter, extensions].

Example:

newuri = URI::LDAP.build({:host => 'ldap.example.com',
  :dn> => '/dc=example'})

newuri = URI::LDAP.build(["ldap.example.com", nil,
  "/dc=example;dc=com", "query", nil, nil, nil])

Description

Create a new URI::LDAP object from generic URI components as per RFC 2396. No LDAP-specific syntax checking is performed.

Arguments are scheme, userinfo, host, port, registry, path, opaque, query and fragment, in that order.

Example:

uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil,
  "/dc=example;dc=com", "query", nil, nil, nil, nil)

See also URI::Generic.new

Instance Methods

returns attributes.

setter for attributes val

private method to assemble query from attributes, scope, filter and extensions.

returns dn.

setter for dn val

returns extensions.

setter for extensions val

returns filter.

setter for filter val

Checks if URI has a path For URI::LDAP this will return false

private method to cleanup dn from using the path component attribute

private method to cleanup attributes, scope, filter and extensions, from using the query component attribute

returns scope.

setter for scope val

private setter for attributes val

private setter for dn val

private setter for extensions val

private setter for filter val

private setter for scope val