authenticate
public boolean authenticate(java.lang.String username,
java.lang.String password)
throws javax.naming.NamingException
Authenticates the given user via an external LDAP server. It throws an NamingException if the LDAP server
can't be reached or the LDAP URL or Base DN is wrong. It allows multiple base DNs and tries to authenticate
against each of them one after another. If an admin user is specified, it tries to search for the user and then
authenticates- if not, it tries to authenticate right away. The username is used as the uid in LDAP.
https://stackoverflow.com/a/24752175/1278769
- Throws:
javax.naming.NamingException