Le 2/3/13 11:28 PM, [email protected] a écrit : > Hi, I'm trying to use a modify request to change the password so that I can > process the response the response if it doesn't' meet the password policy > requirement. > > > connection is connected and authenticated as the user, not an admin. > The pwdReset flag is set TRUE but there are remaining grace logins. > > Entry entry = connection.lookup(dn); > Attribute at = entry.get("userPassword"); > Modification mod = new DefaultModification( > ModificationOperation.REPLACE_ATTRIBUTE, at); > > ModifyRequest modRequest = new ModifyRequestImpl(); > PasswordPolicy ctrl = new PasswordPolicyImpl(); > modRequest.addControl(ctrl); > modRequest.addModification(mod); > ModifyResponse modResponse = > connection.modify(modRequest); // exception thrown here.. > processResponse(modResponse); > //would like to process the response controls from there so that the > appropriate error can be raised to the UI. > > org.apache.directory.api.ldap.model.exception.LdapException: PROTOCOL_ERROR: > The server will disconnect! > > > > Thanks!! > JIRA created : https://issues.apache.org/jira/browse/DIRAPI-119
-- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
