You can access LDAP through Python, but what about Java applications? As mentioned earlier, JNDI technology supportsdirectoryaccess from Java applications, and is part of the Java platform.

You are probably writing a web-facing application that sits in an application server like GlassFish. I wrote a quick a dirty web application (zipped here) that does authentication and searches in much the same way as the Python code. I had already installed OpenDS SE 2.0, and importedExample.ldiffor the data. Here is the top page.

Using the hint, I authenticated as bjensen.

Here's the relevant JSP code.

LDAP Authentication Results

Return to top page.

Equivalent command line:
Bind DN found:

Successful authentication for .

Failed authentication for .

Return to top page.

Searches are even simpler.

This returns a page with all the users having jensen in their name.

The relevant JSP code for this one follows.

LDAP Search Results

Return to top page.

Equivalent command line:
DN : Uid : Email: