Skip to content

Commit

Permalink
edit : 만료기간 로직 수정 (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
dlswns2480 authored Sep 6, 2024
1 parent 13efe67 commit 78225cb
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 78225cb

Please sign in to comment.