Skip to content

Commit 0597e07

Browse files
committed
refactor: JWT 인증 흐름 안정화 및 SecurityContext 처리 보완
1 parent 9b52aa0 commit 0597e07

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/main/java/com/back/web7_9_codecrete_be/global/security/JwtAuthenticationFilter.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ protected void doFilterInternal(HttpServletRequest request,
6565
SecurityContextHolder.getContext().setAuthentication(auth);
6666

6767
} catch (BusinessException ex) {
68-
// Refresh도 실패 → 익명 사용자 유지
68+
// 재발급 실패 시 SecurityContext 비우기
69+
SecurityContextHolder.clearContext();
6970
log.debug("Access Token 재발급 실패: {}", ex.getErrorCode());
7071
}
7172

0 commit comments

Comments
 (0)