From 57a624392316a875da6014c8447cb16ed84fd369 Mon Sep 17 00:00:00 2001 From: CHAE Date: Tue, 7 Nov 2023 15:51:35 +0900 Subject: [PATCH] =?UTF-8?q?:recycle:=20Refactor:=20=ED=86=A0=ED=81=B0=20?= =?UTF-8?q?=EC=9C=A0=ED=9A=A8=EC=84=B1=20=EA=B2=80=EC=82=AC=20=EC=8B=A4?= =?UTF-8?q?=ED=8C=A8=20=EC=8B=9C=20=EB=8B=A8=EC=88=9C=20false=EB=A7=8C=20?= =?UTF-8?q?=EB=B0=98=ED=99=98=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95=20(#58)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/diareat/diareat/auth/component/JwtTokenProvider.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/com/diareat/diareat/auth/component/JwtTokenProvider.java b/src/main/java/com/diareat/diareat/auth/component/JwtTokenProvider.java index fbb9244..eed48e3 100644 --- a/src/main/java/com/diareat/diareat/auth/component/JwtTokenProvider.java +++ b/src/main/java/com/diareat/diareat/auth/component/JwtTokenProvider.java @@ -1,7 +1,5 @@ package com.diareat.diareat.auth.component; -import com.diareat.diareat.util.api.ResponseCode; -import com.diareat.diareat.util.exception.UserException; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jws; import io.jsonwebtoken.Jwts; @@ -63,7 +61,7 @@ public boolean validateToken(String jwtToken) { Jws claims = Jwts.parser().setSigningKey(secretKey).parseClaimsJws(jwtToken); return !claims.getBody().getExpiration().before(new Date()); } catch (Exception e) { - throw new UserException(ResponseCode.TOKEN_VALIDATION_FAILURE); + return false; } }