From 6c075ad1a3852ff383225ea71a10c237fc6bc2fd Mon Sep 17 00:00:00 2001 From: Ganghee-Lee-0522 Date: Fri, 12 Jan 2024 19:51:42 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20oauth2=20=EB=A6=AC=EB=8B=A4?= =?UTF-8?q?=EC=9D=B4=EB=A0=89=EC=85=98=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 401 에러를 수정하고 있습니다. --- .../snowflowerthon/committersserver/auth/jwt/JwtFilter.java | 1 + .../snowflowerthon/committersserver/auth/jwt/JwtUtils.java | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/committers/snowflowerthon/committersserver/auth/jwt/JwtFilter.java b/src/main/java/com/committers/snowflowerthon/committersserver/auth/jwt/JwtFilter.java index 9237b62..9b84ae0 100644 --- a/src/main/java/com/committers/snowflowerthon/committersserver/auth/jwt/JwtFilter.java +++ b/src/main/java/com/committers/snowflowerthon/committersserver/auth/jwt/JwtFilter.java @@ -57,6 +57,7 @@ protected boolean shouldNotFilter(HttpServletRequest request) throws ServletExce || path.equals("/login/oauth2/code/github") || path.equals("/health") || path.equals("/login") + || path.equals("/oauth2/authorization/github") ; } } diff --git a/src/main/java/com/committers/snowflowerthon/committersserver/auth/jwt/JwtUtils.java b/src/main/java/com/committers/snowflowerthon/committersserver/auth/jwt/JwtUtils.java index 7151b4a..dd74d42 100644 --- a/src/main/java/com/committers/snowflowerthon/committersserver/auth/jwt/JwtUtils.java +++ b/src/main/java/com/committers/snowflowerthon/committersserver/auth/jwt/JwtUtils.java @@ -76,7 +76,8 @@ public void deleteRefreshTokenByNickname(String nickname) { public boolean validateToken(String token) { if (!StringUtils.hasText(token)) { // throw new AppException(ErrorCode.JWT_TOKEN_NOT_EXISTS); - throw new TokenException(ErrorCode.JWT_TOKEN_NOT_EXISTS); +// throw new TokenException(ErrorCode.JWT_TOKEN_NOT_EXISTS); + return false; } if(isLogout(token)){ // throw new AppException(ErrorCode.JWT_TOKEN_EXPIRED);