Package auth.gui
Class SigninLdap
- java.lang.Object
-
- auth.gui.SigninLdap
-
@Singleton public class SigninLdap extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SigninLdap()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauthenticate(java.lang.String username, java.lang.String password)Authenticates the given user via an external LDAP server.
-
-
-
Method Detail
-
authenticate
public boolean authenticate(java.lang.String username, java.lang.String password) throws javax.naming.NamingExceptionAuthenticates the given user via an external LDAP server. It throws anNamingExceptionif 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
-
-