Skip to content

Commit 08e8ae2

Browse files
derTobschrwinch
authored andcommitted
Force reconnect with credentials on DefaultTlsDirContextAuthenticationStrategy
refs #430
1 parent 9d8f9fb commit 08e8ae2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

core/src/main/java/org/springframework/ldap/core/support/DefaultTlsDirContextAuthenticationStrategy.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ protected void applyAuthentication(LdapContext ctx, String userDn, String passwo
3636
ctx.addToEnvironment(Context.SECURITY_AUTHENTICATION, SIMPLE_AUTHENTICATION);
3737
ctx.addToEnvironment(Context.SECURITY_PRINCIPAL, userDn);
3838
ctx.addToEnvironment(Context.SECURITY_CREDENTIALS, password);
39+
// Force reconnect with user credentials
40+
ctx.reconnect(null);
3941
}
4042

4143
}

0 commit comments

Comments
 (0)