Package javaforce

Class LDAP

java.lang.Object
javaforce.LDAP

public class LDAP extends Object
  • Field Details

    • lastException

      public Exception lastException
  • Constructor Details

    • LDAP

      public LDAP()
  • Method Details

    • login

      public boolean login(String server, String domain, String username, String password)
      Logins into a LDAP Server. Returns DirContext if successful (null otherwise).
    • close

      public void close()
    • getAttributes

      public String[] getAttributes(String domain, String key, String[] attrs)
      Returns user object attributes.
      Parameters:
      domain - = domain as dn (distinguished name) (ie: DC=example,DC=com)
      key - = search key (ie: SAMAccountName=bob mail=bob@example.com)
      attrs - = list of attributes to read
      Returns:
      attributes in order of attrs
    • build_dn

      public static String build_dn(String domain)
    • getLastException

      public Exception getLastException()