diff --git a/application/src/main/kotlin/com/pokit/auth/port/service/JwtTokenProvider.kt b/application/src/main/kotlin/com/pokit/auth/port/service/JwtTokenProvider.kt index f11df5a9..a8bfa8d1 100644 --- a/application/src/main/kotlin/com/pokit/auth/port/service/JwtTokenProvider.kt +++ b/application/src/main/kotlin/com/pokit/auth/port/service/JwtTokenProvider.kt @@ -19,9 +19,12 @@ class JwtTokenProvider( private val jwtProperty: JwtProperty, private val refreshTokenPort: RefreshTokenPort, ) : TokenProvider { + companion object { + private const val TO_DAY = 86400000 + } override fun createToken(userId: Long): Token { - val accessToken = generateToken(userId, jwtProperty.accessExpiryTime) - val refreshToken = generateToken(userId, jwtProperty.refreshExpiryTime) + val accessToken = generateToken(userId, jwtProperty.accessExpiryTime * TO_DAY) + val refreshToken = generateToken(userId, jwtProperty.refreshExpiryTime * TO_DAY) refreshTokenPort.deleteByUserId(userId) refreshTokenPort.persist(RefreshToken(userId, refreshToken))