commit | 4a932a37019d655ee5114454dc19145984bcff3d | [log] [tgz] |
---|---|---|
author | emmanuel lecharny <elecharny@apache.org> | Wed May 08 00:58:01 2019 +0200 |
committer | emmanuel lecharny <elecharny@apache.org> | Wed May 08 00:58:01 2019 +0200 |
tree | d7f86dd4a9a670a1cf64b884f983088549419cc3 | |
parent | ae298c1ee22c0b1d16d5a9a2930415aabd18b149 [diff] | |
parent | 770a8ab20fb9c9a5a1d4a3d8c5ac3349252c915a [diff] |
Merge branch 'master' of https://gitbox.apache.org/repos/asf/directory-server
diff --git a/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java b/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java index 1dd8773..b58e6c5 100644 --- a/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java +++ b/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/DelegatingAuthenticator.java
@@ -283,9 +283,6 @@ try { ldapConnection.bind( bindDn, Strings.utf8ToString( bindContext.getCredentials() ) ); - - // no need to remain bound to delegate host - ldapConnection.unBind(); } catch ( LdapException le ) { @@ -293,6 +290,16 @@ LOG.info( message ); throw new LdapAuthenticationException( message ); } + finally + { + // no need to remain bound to delegate host + ldapConnection.unBind(); + + if ( IS_DEBUG ) + { + LOG.debug( "Authenticated successfully {}", bindContext.getDn() ); + } + } // Create the new principal principal = new LdapPrincipal( getDirectoryService().getSchemaManager(), bindDn,