edu.northwestern.at.utils.net.ldap
Class LdapDirectory

java.lang.Object
  extended by edu.northwestern.at.utils.net.ldap.LdapDirectory

public class LdapDirectory
extends java.lang.Object

The LDAP directory.

This static class provides utility methods to communicate with the NU LDAP directory servers.


Constructor Summary
protected LdapDirectory()
          Don't allow instantiation but do allow overrides.
 
Method Summary
static boolean authenticateNetid(java.lang.String ldapURL, java.lang.String ldapPrincipal, java.lang.String netid, java.lang.String password)
          Validate a username/password pair using an LDAP directory.
static java.util.Map getInfoForNetid(java.lang.String ldapURL, java.lang.String ldapPrincipal, java.lang.String netid)
          Gets the LDAP directory information for a netid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LdapDirectory

protected LdapDirectory()
Don't allow instantiation but do allow overrides.

Method Detail

authenticateNetid

public static boolean authenticateNetid(java.lang.String ldapURL,
                                        java.lang.String ldapPrincipal,
                                        java.lang.String netid,
                                        java.lang.String password)
Validate a username/password pair using an LDAP directory.

Parameters:
ldapURL - The LDAP service URL.
ldapPrincipal - The LDAP principal string.
netid - The netid.
password - The password.
Returns:
True if validation successful.

getInfoForNetid

public static java.util.Map getInfoForNetid(java.lang.String ldapURL,
                                            java.lang.String ldapPrincipal,
                                            java.lang.String netid)
                                     throws LdapException
Gets the LDAP directory information for a netid.

Parameters:
ldapURL - The LDAP service URL.
ldapPrincipal - The LDAP principal string.
netid - The netid.
Returns:
A mapping from LDAP field names to LDAP field values.
Throws:
LdapException