boolean pwdOk = ldap.checkPassword(loginName, userPassword);
System.out.println("The password=" + userPassword + " for cn=" + loginName + " is " + ((pwdOk)?"":" NOT ") + " valid.");
System.out.println("\nTesting getAllAttributes() ...");
Hashtable attrHash = ldap.getAllAttributes(loginName, userPassword, loginName);
Enumeration keys = attrHash.keys();
while( keys.hasMoreElements() ) {
String key = (String)keys.nextElement();
System.out.println(key + ": " + attrHash.get(key));
}
}