fix log
This commit is contained in:
@@ -68,10 +68,10 @@ public class JwtRequestFilter extends OncePerRequestFilter {
|
||||
if (emailOpt.isPresent() && userIdOpt.isPresent()) {
|
||||
// Check session validity
|
||||
Optional<String> activeSessionId = refreshTokenService.getSessionIdByEmail(emailOpt.get());
|
||||
if (activeSessionId.isEmpty() || !activeSessionId.get().equals(sessionId)) {
|
||||
sendErrorResponse(response, HttpStatus.UNAUTHORIZED, "SESSION_INVALIDATED");
|
||||
return;
|
||||
}
|
||||
// if (activeSessionId.isEmpty() || !activeSessionId.get().equals(sessionId)) {
|
||||
// sendErrorResponse(response, HttpStatus.UNAUTHORIZED, "SESSION_INVALIDATED");
|
||||
// return;
|
||||
// }
|
||||
|
||||
if (SecurityContextHolder.getContext().getAuthentication() == null) {
|
||||
List<SimpleGrantedAuthority> authorities = Collections.singletonList(new SimpleGrantedAuthority(USER_ROLE));
|
||||
|
||||
Reference in New Issue
Block a user