public static class ActiveDirectory.User extends Object
| Constructor and Description |
|---|
ActiveDirectory.User(Attributes attr) |
| Modifier and Type | Method and Description |
|---|---|
void |
changePassword(String oldPass,
String newPass,
boolean trustAllCerts,
LdapContext context)
Used to change the user password.
|
void |
changePassword(String oldPass,
String newPass,
LdapContext context)
Used to change the user password.
|
Attributes |
getAttributes() |
String |
getCommonName() |
String |
getDistinguishedName() |
String |
getUserPrincipal() |
String |
toString() |
public ActiveDirectory.User(Attributes attr) throws NamingException
NamingExceptionpublic Attributes getAttributes()
public String getUserPrincipal()
public String getCommonName()
public String getDistinguishedName()
public void changePassword(String oldPass, String newPass, LdapContext context) throws IOException, NamingException
oldPass - newPass - context - IOExceptionNamingExceptionpublic void changePassword(String oldPass, String newPass, boolean trustAllCerts, LdapContext context) throws IOException, InvalidAttributeValueException, NamingException
oldPass - newPass - trustAllCerts - If true, bypasses all certificate and host name
validation. If false, ensure that the LDAPS certificate has been
imported into a trust store and sourced before calling this method.
Example: String keystore =
"/usr/java/jdk1.5.0_01/jre/lib/security/cacerts";
System.setProperty("javax.net.ssl.trustStore",keystore);context - IOExceptionInvalidAttributeValueExceptionNamingExceptionCopyright © 2015. All rights reserved.