Skip to content

Commit

Permalink
Merge pull request #207 from Team-MindWay/fix/206-token-not-work-problem
Browse files Browse the repository at this point in the history
🔀 :: tokenExpiration 시간 수정
  • Loading branch information
Umjiseung authored Aug 21, 2024
2 parents 48878f7 + 37bfc41 commit 2202b6d
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ public String parseRefreshToken(String refreshToken) {
}

public String generateAccessToken(UUID id) {
long now = (new Date()).getTime();

Date accessTokenExpiresIn = new Date(now + ACCESS_TOKEN_TIME);
Date accessTokenExpiresIn = new Date(System.currentTimeMillis() + ACCESS_TOKEN_TIME * 1000);

return Jwts.builder()
.setSubject(id.toString())
Expand All @@ -133,9 +131,7 @@ public String generateAccessToken(UUID id) {
}

public String generateRefreshToken(UUID id) {
long now = (new Date()).getTime();

Date refreshTokenExpiresIn = new Date(now + REFRESH_TOKEN_TIME);
Date refreshTokenExpiresIn = new Date(System.currentTimeMillis() + REFRESH_TOKEN_TIME * 1000);

return Jwts.builder()
.setSubject(id.toString())
Expand Down

0 comments on commit 2202b6d

Please sign in to comment.