Skip to content

Commit

Permalink
[HOTFIX] getJwtFromRequest 메서드 에러 처리 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
ckkim817 committed Dec 25, 2024
1 parent 308f9b7 commit 1c12cf3
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static org.sopt.seonyakServer.global.auth.jwt.JwtValidationType.VALID_JWT;

import io.jsonwebtoken.ExpiredJwtException;
import jakarta.servlet.FilterChain;
import jakarta.servlet.ServletException;
import jakarta.servlet.http.HttpServletRequest;
Expand Down Expand Up @@ -51,10 +50,11 @@ protected void doFilterInternal(@NonNull HttpServletRequest request,
// 이렇게 하면 API의 permitAll 적용 여부에 따라 ExceptionTranslationFilter를 거칠지 판단하게 된다.
log.error("JwtAuthentication Authentication Exception Occurs! - {}", exception.getMessage());

if (exception instanceof ExpiredJwtException) {
throw new CustomException(ErrorType.EXPIRED_JWT_TOKEN);
if (exception instanceof CustomException) {
throw exception;
}
}

// 다음 필터로 요청 전달 (호출)
filterChain.doFilter(request, response);
}
Expand Down

0 comments on commit 1c12cf3

Please sign in to comment.