Package auth.gui

Class 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
      boolean authenticate​(java.lang.String username, java.lang.String password)
      Authenticates the given user via an external LDAP server.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SigninLdap

        public SigninLdap()
    • Method Detail

      • 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