From 5c1ad4c28589fd8640c1fce499c4c43993fe39a9 Mon Sep 17 00:00:00 2001 From: "2jin2.1031" <2jin2.1031@gmail.com> Date: Sun, 12 Jan 2025 21:22:05 +0900 Subject: [PATCH 1/4] =?UTF-8?q?refactor:=20=EC=9E=84=EC=8B=9C=20refresh=20?= =?UTF-8?q?token=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/org/example/backend/jwt/LoginFilter.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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..3818c170 100644 --- a/backend/src/main/java/org/example/backend/jwt/LoginFilter.java +++ b/backend/src/main/java/org/example/backend/jwt/LoginFilter.java @@ -89,8 +89,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); - +거 response.addHeader("Authorization", "Bearer " + accessToken); } From c414c95a07cea476dc426a454ee645f7167130aa Mon Sep 17 00:00:00 2001 From: "2jin2.1031" <2jin2.1031@gmail.com> Date: Sun, 12 Jan 2025 21:22:48 +0900 Subject: [PATCH 2/4] =?UTF-8?q?refactor:=20=EC=98=A4=ED=83=80=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/org/example/backend/jwt/LoginFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 3818c170..4f3ab842 100644 --- a/backend/src/main/java/org/example/backend/jwt/LoginFilter.java +++ b/backend/src/main/java/org/example/backend/jwt/LoginFilter.java @@ -89,7 +89,7 @@ protected void successfulAuthentication(HttpServletRequest request, HttpServletR String role = auth.getAuthority(); String accessToken = jwtUtil.createJwt(loginId, role, 100000000 * 1800 * 100 * 10L); -거 + response.addHeader("Authorization", "Bearer " + accessToken); } From cd44df77198298a567ad00797681aecf99c8f256 Mon Sep 17 00:00:00 2001 From: "2jin2.1031" <2jin2.1031@gmail.com> Date: Thu, 16 Jan 2025 00:53:31 +0900 Subject: [PATCH 3/4] =?UTF-8?q?refactor:=20=EC=A3=BC=EC=84=9D=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/org/example/backend/jwt/JWTUtil.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() From 30e59c38f571004592ce3ae1819c9a16957c861b Mon Sep 17 00:00:00 2001 From: "2jin2.1031" <2jin2.1031@gmail.com> Date: Thu, 16 Jan 2025 00:59:26 +0900 Subject: [PATCH 4/4] =?UTF-8?q?refactor:=20accessToken=20=EB=A7=8C?= =?UTF-8?q?=EB=A3=8C=20=EC=8B=9C=EA=B0=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/src/main/java/org/example/backend/jwt/LoginFilter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4f3ab842..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,7 +88,7 @@ protected void successfulAuthentication(HttpServletRequest request, HttpServletR String role = auth.getAuthority(); - String accessToken = jwtUtil.createJwt(loginId, role, 100000000 * 1800 * 100 * 10L); + String accessToken = jwtUtil.createJwt(loginId, role, 1800 * 1000L); response.addHeader("Authorization", "Bearer " + accessToken); }