diff --git a/backend/src/main/java/org/example/backend/jwt/JWTUtil.java b/backend/src/main/java/org/example/backend/jwt/JWTUtil.java index 172a3c92..f7e58b48 100644 --- a/backend/src/main/java/org/example/backend/jwt/JWTUtil.java +++ b/backend/src/main/java/org/example/backend/jwt/JWTUtil.java @@ -70,7 +70,8 @@ public boolean validateToken(String token) { } } - public Claims extractClaims(String token) { + public Claims extractClaims(String token) { // JWT 토큰에서 클레임(Claims)을 추출 + // 반환된 Claims 객체는 JWT 토큰에 포함된 데이터를 키-값 쌍으로 제공 return Jwts.parserBuilder() .setSigningKey(key) .build() diff --git a/backend/src/main/java/org/example/backend/jwt/LoginFilter.java b/backend/src/main/java/org/example/backend/jwt/LoginFilter.java index ddeadcf8..919fb118 100644 --- a/backend/src/main/java/org/example/backend/jwt/LoginFilter.java +++ b/backend/src/main/java/org/example/backend/jwt/LoginFilter.java @@ -88,8 +88,7 @@ protected void successfulAuthentication(HttpServletRequest request, HttpServletR String role = auth.getAuthority(); - String accessToken = jwtUtil.createJwt(loginId, role, 100000000 * 1800 * 100 * 10L); - String refreshToken = jwtUtil.createJwt(loginId, role, 60 * 60 * 24 * 30 * 1000L); + String accessToken = jwtUtil.createJwt(loginId, role, 1800 * 1000L); response.addHeader("Authorization", "Bearer " + accessToken); }