Skip to content

Commit

Permalink
fix: 리프레시 토큰 만료 시 리프레시 토큰 담은 쿠키 Expire
Browse files Browse the repository at this point in the history
  • Loading branch information
sunghyuki committed Mar 19, 2024
1 parent ed8a4f7 commit 4418a44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ private void authenticateWithRefreshToken(HttpServletRequest request, HttpServle
chain.doFilter(request, response);
} catch (ExpiredTokenException | EntityNotFoundException | AbnormalAccessException e) {
tokenService.deleteRefreshToken(refreshToken);
CookieUtils.expireCookie(response, "refreshToken");
throw e;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ public class JWTUtil {
// public static final int REFRESH_TIME = 60 * 60 * 24 * 7;
public static final int REFRESH_TIME = 15;
public static final String KEY = "collusic-new";
// private static final int ACCESS_TIME = 60 * 60;
private static final int ACCESS_TIME = 15;
// private static final int ACCESS_TIME = 60 * 60;
private static final int ACCESS_TIME = 15;

public static String createAccessToken(String email, String role) {
return Jwts.builder()
Expand Down

0 comments on commit 4418a44

Please sign in to comment.