Password Modify

Modifies an entry’s userPassword attribute as described in RFC 3062.

ExtendedOperation passModify = ExtendedOperation.builder()
  .factory(new DefaultConnectionFactory("ldap://directory.ldaptive.org"))
  .throwIf(ResultPredicate.NOT_SUCCESS)
  .build();
ExtendedResponse res = passModify.execute(
  new PasswordModifyRequest(
    "uid=dfisher,ou=people,dc=ldaptive,dc=org", "oldPass", "newPass"));

This operation can also be used to generate passwords:

ExtendedOperation passModify = new ExtendedOperation(new DefaultConnectionFactory("ldap://directory.ldaptive.org"));
ExtendedResponse response = passModify.execute(new PasswordModifyRequest("uid=dfisher,ou=people,dc=ldaptive,dc=org"));
String genPass = PasswordModifyResponseParser.parse(response);