Add SecurityContextHolder#addListener

Closes gh-10032
This commit is contained in:
Hiroshi Shirosaki
2021-06-16 16:53:13 +09:00
committed by Josh Cummings
parent b8d51725c7
commit 6f3e346b76
9 changed files with 247 additions and 8 deletions

View File

@@ -68,14 +68,11 @@ public class SecurityContextLogoutHandler implements LogoutHandler {
}
}
}
SecurityContext context = SecurityContextHolder.getContext();
SecurityContextHolder.clearContext();
if (this.clearAuthentication) {
SecurityContext context = SecurityContextHolder.getContext();
SecurityContextHolder.clearContext();
context.setAuthentication(null);
}
else {
SecurityContextHolder.clearContext();
}
}
public boolean isInvalidateHttpSession() {