From d65cfc015d6f238d9f8d78b2638cfd20b456225e Mon Sep 17 00:00:00 2001 From: JunRain Date: Wed, 5 Jun 2024 20:55:02 +0900 Subject: [PATCH] =?UTF-8?q?[hotfix]=20swagger=20=EC=A0=91=EC=86=8D=20?= =?UTF-8?q?=EC=95=88=EB=90=98=EB=8A=94=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 | 10 ++++++++-- 1 file changed, 8 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 b7fbd95..94e28a1 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 @@ -66,13 +66,19 @@ private void checkRefreshTokenAndReIssueAccessToken(HttpServletResponse response private void checkAccessTokenAndAuthentication(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { + // TODO swagger 전달을 위한 코드 추후 제거 + try { + jwtService.extractAccessToken(request); + } catch (Exception e) { + filterChain.doFilter(request, response); + } + try { String email = jwtService.getEmail(request); memberRepository.findByEmail(email).ifPresent(this::saveAuthentication); + filterChain.doFilter(request, response); } catch (Exception e) { response.setStatus(SC_FORBIDDEN); - } finally { - filterChain.doFilter(request, response); } }