[ https://issues.apache.org/jira/browse/DIRAPI-361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17355020#comment-17355020 ]
Gunics Balázs commented on DIRAPI-361: -------------------------------------- Thank you [~elecharny], I wasn't able to figure out that getPwdRespCtrl function of yours, this is the one I cooked up: {code:java} ... BindRequest bindRequest = new BindRequestImpl(); bindRequest = bindRequest.setName(context.searchString).setCredentials( context.searchStringPwd ).addControl( new PasswordPolicyRequestImpl() ); BindResponse bindResponse = ld.bind( bindRequest ); log.warn("Result code is: " + bindResponse.getLdapResult().getResultCode() ); for(String key : bindResponse.getControls().keySet() ) { log.warn("Control key: " + key ) ; Control ctrl = bindResponse.getControl(key); log.warn("Control object: " + ctrl.toString()); } PasswordPolicyResponse pwdResp = (new PasswordPolicyResponseContainer(bindResponse.getControl( PasswordPolicyResponse.OID ))).getPasswordPolicyResponse(); log.warn("PasswordPolicyResponse is: " + pwdResp); if(pwdResp != null ) { log.warn("PasswordPolicyErrorEnum is: " + pwdResp.getPasswordPolicyError() ) ; log.warn("TIme before expiration: " + pwdResp.getTimeBeforeExpiration() ); } ... {code} Unfortunately the Controls are empty. Maybe this PasswordPolicy depends on the environment and only visible in the control if the server supports it? (I'm not able to run this by myself on the environment that has the issue unfortunately.) > LDAP Protocol error if password is expiring > ------------------------------------------- > > Key: DIRAPI-361 > URL: https://issues.apache.org/jira/browse/DIRAPI-361 > Project: Directory Client API > Issue Type: Bug > Affects Versions: 2.0.1 > Environment: Java 8 > Reporter: Marco Cuccato > Priority: Critical > > An LdapOperationException is raised at bind() if the user has the password > expiring (but not expired yet). > Exception: > MessageType : BIND_RESPONSE > Message ID : -1 > BindResponse > Ldap Result > Result code : (PROTOCOL_ERROR) protocolError > Matched Dn : 'null' > Diagnostic message : 'PROTOCOL_ERROR: The server will disconnect!' > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org For additional commands, e-mail: dev-h...@directory.apache.org