Skip to content

Commit

Permalink
[chore] 테스트용으로 잠시 토큰 만료 시간 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
JeonHaeseung committed Jul 9, 2024
1 parent db24496 commit ecc1522
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

@Getter
@NoArgsConstructor
@RedisHash(value = "refreshToken", timeToLive = 60*60*24*14)
//@RedisHash(value = "refreshToken", timeToLive = 60*60*24*14)
@RedisHash(value = "refreshToken", timeToLive = 5)
public class RefreshToken { /* Redis에 저장해서 RefreshToken이 유효한지 검증 */
@Id
@Indexed
Expand All @@ -27,6 +28,7 @@ public class RefreshToken { /* Redis에 저장해서 RefreshToken이 유효한
public RefreshToken(String jwtRefreshToken, String authKey) {
this.jwtRefreshToken = jwtRefreshToken;
this.authKey = authKey;
this.ttl = 1000L * 60 * 60 * 24 * 14;
//this.ttl = 1000L * 60 * 60 * 24 * 14;
this.ttl = 1000L * 5;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ public class JwtTokenProvider {
/* 토큰의 만료 시간 설정
* jwtAccessToken은 1시간, jwtRefreshToken은 1주 */
//private static final long JWT_EXPIRATION_TIME = 1000L * 60 * 60; //1시간
private static final long JWT_EXPIRATION_TIME = 1000L * 60 * 60 * 24; //개발 테스트용: 하루
private static final long REFRESH_TOKEN_EXPIRATION_TIME = 1000L * 60 * 60 * 24 * 14;
//private static final long REFRESH_TOKEN_EXPIRATION_TIME = 1000L * 60 * 60 * 24 * 14; //14일
private static final long JWT_EXPIRATION_TIME = 1000L * 60 * 2;
private static final long REFRESH_TOKEN_EXPIRATION_TIME = 1000L * 60 * 5;

private static final String AUTHORITIES_KEY = "auth";

Expand Down

0 comments on commit ecc1522

Please sign in to comment.