Querying An Ldap Directory; Scope; Search Filter - MACROMEDIA COLDFUSION MX 61-DEVELOPING COLDFUSION MX Develop Manual

Developing coldfusion mx applications
Table of Contents

Advertisement

Action
Required attributes
modifyDN
server, dn, attributes
delete
server, dn

Querying an LDAP directory

The
tag lets you search an LDAP directory. The tag returns a ColdFusion query object
cfldap
with the results, which you can use as you would any query result. When you query an LDAP
directory, you specify the directory entry where the search starts and the attributes whose values to
return. You can specify the search scope and attribute content filtering rules and use other
attributes to further control the search.

Scope

The search scope sets the limits of a search. The default scope is the level below the distinguished
name specified in the
attribute. For example, if the
start
below support is searched. You can restrict a query to the level of the
the entire subtree below the

Search filter

The search filter syntax has the form attribute operator value. The default filter, objectclass=*,
returns all entries in the scope.
The following table lists the filter operators:
Operator
Example
=*
(mail=*)
=
(o=macromedia)
~=
(sn~=Hansen)
>=
(st>=ma)
<=
(st<=ma)
*
(o=macro*)
(o=*media)
(o=mac*ia)
(o=*med*)
Optional attributes
port, username, password, timeout, secure, rebind,
referral
port, username, password, timeout, secure, rebind,
referral
attribute. This scope does not include the entry identified by the
start
attribute is "ou=support, o=macromedia" the level
start
entry.
start
Matches
All entries that contain a mail attribute.
Entries in which the organization name is macromedia.
Entries with a surname that approximates Hansen. The
matching rules for approximate matches vary among directory
vendors, but anything that "sounds like" the search string
should be matched. In this example, the directory server might
return entries with the surnames Hansen and Hanson.
The name "ma" and names appearing after "ma" in an
alphabetical state attribute list.
The name "ma" and names appearing before "ma" in an
alphabetical state attribute list.
Organization names that start with "macro".
Organization names that end with "media".
Organization names that start with "mac" and end with "ia". You
can use more than one * operator in a string; for example,
m*ro*dia.
Organization names that contain the string "med", including the
exact string match "med".
entry, or extend it to
start

Querying an LDAP directory

483

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the COLDFUSION MX 61-DEVELOPING COLDFUSION MX and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Coldfusion mx

Table of Contents