FIxed JWT issue

This commit is contained in:
rajeshkhore
2024-12-04 20:45:42 +05:30
parent 25f90d5bdb
commit 60af881924
4 changed files with 85 additions and 90 deletions

View File

@@ -203,8 +203,6 @@ public class AuthenticationService {
public void logout(HttpServletRequest request, HttpServletResponse response) {
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
if (auth != null) {
String token = tokenProvider.extractTokenFromRequest(request);
tokenProvider.invalidateToken(token);
new SecurityContextLogoutHandler().logout(request, response, auth);
}
SecurityContextHolder.getContext().setAuthentication(null);