From fd11fda4397f4a788ccb44226b42430d90ff4abc Mon Sep 17 00:00:00 2001 From: seongjae6751 Date: Tue, 16 Apr 2024 21:12:46 +0900 Subject: [PATCH] =?UTF-8?q?feature:=20=EB=A6=AC=ED=94=84=EB=A0=88=EC=8B=9C?= =?UTF-8?q?=20=ED=86=A0=ED=81=B0=20=EB=A7=8C=EB=A3=8C=20=EA=B8=B0=ED=95=9C?= =?UTF-8?q?=EC=9D=84=2014=EC=9D=BC=EC=97=90=EC=84=9C=2020=EC=B4=88?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../in/koreatech/koin/domain/user/model/UserToken.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/java/in/koreatech/koin/domain/user/model/UserToken.java b/src/main/java/in/koreatech/koin/domain/user/model/UserToken.java index 094c12fbf..f6600cd95 100644 --- a/src/main/java/in/koreatech/koin/domain/user/model/UserToken.java +++ b/src/main/java/in/koreatech/koin/domain/user/model/UserToken.java @@ -1,7 +1,5 @@ package in.koreatech.koin.domain.user.model; -import java.util.concurrent.TimeUnit; - import org.springframework.data.annotation.Id; import org.springframework.data.redis.core.RedisHash; import org.springframework.data.redis.core.TimeToLive; @@ -12,14 +10,14 @@ @RedisHash("refreshToken") public class UserToken { - private static final long REFRESH_TOKEN_EXPIRE_DAY = 14L; + private static final long REFRESH_TOKEN_EXPIRE_SECONDS = 20L; @Id private Integer id; private final String refreshToken; - @TimeToLive(unit = TimeUnit.DAYS) + @TimeToLive private final Long expiration; private UserToken(Integer id, String refreshToken, Long expiration) { @@ -29,6 +27,6 @@ private UserToken(Integer id, String refreshToken, Long expiration) { } public static UserToken create(Integer userId, String refreshToken) { - return new UserToken(userId, refreshToken, REFRESH_TOKEN_EXPIRE_DAY); + return new UserToken(userId, refreshToken, REFRESH_TOKEN_EXPIRE_SECONDS); } }