From d3182c6f090a63d3a55e56634d6611296e84c0de Mon Sep 17 00:00:00 2001 From: koungq Date: Tue, 20 Aug 2024 19:42:03 +0900 Subject: [PATCH] =?UTF-8?q?Hotfix:=20JWT=20=EB=A1=9C=EC=A7=81=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../auth/jwt/filter/JwtAuthenticationProcessingFilter.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/leets/weeth/global/auth/jwt/filter/JwtAuthenticationProcessingFilter.java b/src/main/java/leets/weeth/global/auth/jwt/filter/JwtAuthenticationProcessingFilter.java index 5dd0da84..5ac699c3 100644 --- a/src/main/java/leets/weeth/global/auth/jwt/filter/JwtAuthenticationProcessingFilter.java +++ b/src/main/java/leets/weeth/global/auth/jwt/filter/JwtAuthenticationProcessingFilter.java @@ -57,7 +57,9 @@ public void checkAccessTokenAndRefreshToken(HttpServletRequest request, HttpServ .filter(jwtService::isTokenValid) .orElse(null); - if (accessToken != null) { + if (accessToken == null) { + checkRefreshTokenAndReIssueAccessToken(response, refreshToken); + } else { jwtService.extractEmail(accessToken) .ifPresent(email -> userRepository.findByEmail(email) .ifPresent(this::saveAuthentication)); @@ -65,7 +67,6 @@ public void checkAccessTokenAndRefreshToken(HttpServletRequest request, HttpServ filterChain.doFilter(request, response); } - checkRefreshTokenAndReIssueAccessToken(response, refreshToken); }