Skip to content

Commit

Permalink
[chore] 테스트 완료, 엑세스 및 리프레시 토큰의 기간 1시간/2주로 재설정
Browse files Browse the repository at this point in the history
  • Loading branch information
JeonHaeseung committed Jul 10, 2024
1 parent f5ed237 commit ed459e5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@

@Getter
@NoArgsConstructor
//@RedisHash(value = "refreshToken", timeToLive = 60*60*24*14)
@RedisHash(value = "refreshToken", timeToLive = 60*5)
@RedisHash(value = "refreshToken", timeToLive = 60*60*24*14)
public class RefreshToken { /* Redis에 저장해서 RefreshToken이 유효한지 검증 */
@Id
@Indexed
Expand All @@ -28,7 +27,6 @@ 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 * 5;
this.ttl = 1000L * 60 * 60 * 24 * 14;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ public class JwtTokenProvider {

/* 토큰의 만료 시간 설정
* jwtAccessToken은 1시간, jwtRefreshToken은 1주 */
//private static final long JWT_EXPIRATION_TIME = 1000L * 60 * 60; //1시간
//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 long JWT_EXPIRATION_TIME = 1000L * 60 * 60; //1시간
private static final long REFRESH_TOKEN_EXPIRATION_TIME = 1000L * 60 * 60 * 24 * 14; //14일

private static final String AUTHORITIES_KEY = "auth";

Expand Down

0 comments on commit ed459e5

Please sign in to comment.