Skip to content

Commit

Permalink
feat: 토큰 만료시간 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
f1v3-dev committed Nov 27, 2024
1 parent 2ac1ff3 commit b3dfb87
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/main/java/com/dnd/jjakkak/domain/jwt/provider/JwtProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +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));

// TODO: 테스트용으로 만료시간 1분으로 설정
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 @@ -70,11 +66,7 @@ public String createAccessToken(String kakaoId) {
* @return JWT
*/
public String createRefreshToken(String kakaoId) {
// Date expiredDate = Date.from(Instant.now().plus(refreshTokenExpirationDay, ChronoUnit.DAYS));

// TODO: 테스트용으로 만료시간 2분으로 설정
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 b3dfb87

Please sign in to comment.