From bb83b282d50fb8442e67980c3c791488452d0e9d Mon Sep 17 00:00:00 2001 From: JunRain Date: Wed, 5 Jun 2024 17:38:30 +0900 Subject: [PATCH] =?UTF-8?q?[hotfix]=20JwtAuthenticationProcessingFilter=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=EC=9C=BC=EB=A1=9C=20=EC=9D=B8=ED=95=9C=20swa?= =?UTF-8?q?gger=20=EC=A0=91=EC=86=8D=20=EB=AC=B8=EC=A0=9C=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jwt/filter/JwtAuthenticationProcessingFilter.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/memetory/src/main/java/com/example/memetory/global/security/jwt/filter/JwtAuthenticationProcessingFilter.java b/backend/memetory/src/main/java/com/example/memetory/global/security/jwt/filter/JwtAuthenticationProcessingFilter.java index 5a77455..05ca701 100644 --- a/backend/memetory/src/main/java/com/example/memetory/global/security/jwt/filter/JwtAuthenticationProcessingFilter.java +++ b/backend/memetory/src/main/java/com/example/memetory/global/security/jwt/filter/JwtAuthenticationProcessingFilter.java @@ -65,14 +65,16 @@ private void checkRefreshTokenAndReIssueAccessToken(HttpServletResponse response } private void checkAccessTokenAndAuthentication(HttpServletRequest request, HttpServletResponse response, - FilterChain filterChain) { + FilterChain filterChain) throws ServletException, IOException { try { String email = jwtService.getEmail(request); memberRepository.findByEmail(email).ifPresent(this::saveAuthentication); - filterChain.doFilter(request, response); } catch (Exception e) { sendError(response, SC_FORBIDDEN); } + finally { + filterChain.doFilter(request, response); + } } private void saveAuthentication(Member myMember) {