LDAP Authentication using Java
Authenticating a user against an LDAP directory does not require a framework. A plain JNDI context is enough: bind to the directory as the user with the password they supplied and let the directory server decide whether the credentials are valid. This post was written in 2008. The JNDI API shown here is still part of the JDK and still works, but the original example connected over an unencrypted ldap:// URL, which sends the password over the network in clear text.
Read more