Skip to content

Commit

Permalink
feat: 토큰(AT, RT) 만료시간 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
f1v3-dev committed Nov 27, 2024
1 parent ae39150 commit 69d037b
Showing 1 changed file with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ public JwtProvider(JjakkakProperties jjakkakProperties, TokenProperties tokenPro
* @return JWT
*/
public String createAccessToken(String kakaoId) {

// Date expiredDate = Date.from(Instant.now().plus(accessTokenExpirationDay, ChronoUnit.DAYS));
Date expiredDate = Date.from(Instant.now().plus(1, ChronoUnit.MINUTES));

Date expiredDate = Date.from(Instant.now().plus(accessTokenExpirationDay, ChronoUnit.DAYS));

return Jwts.builder()
.signWith(key, SignatureAlgorithm.HS256)
Expand All @@ -69,8 +66,7 @@ public String createAccessToken(String kakaoId) {
* @return JWT
*/
public String createRefreshToken(String kakaoId) {
// Date expiredDate = Date.from(Instant.now().plus(refreshTokenExpirationDay, ChronoUnit.DAYS));
Date expiredDate = Date.from(Instant.now().plus(2, ChronoUnit.MINUTES));
Date expiredDate = Date.from(Instant.now().plus(refreshTokenExpirationDay, ChronoUnit.DAYS));

return Jwts.builder()
.signWith(key, SignatureAlgorithm.HS256)
Expand Down

0 comments on commit 69d037b

Please sign in to comment.