Skip to content

Commit

Permalink
Merge branch 'main' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
MoonJeWoong authored Mar 3, 2024
2 parents dc2d4ba + ea1f750 commit feb5e52
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ public ResponseEntity<TokenResponse> refresh(
return ResponseEntity.ok(tokenResponse);
}

private Cookie setUpRefreshTokenCookie(TokenResponse tokenResponse) {
Cookie cookie = new Cookie("refreshToken", tokenResponse.refreshToken().toString());
cookie.setMaxAge(refreshTokenExpireLength.intValue() / 1000);
cookie.setPath("/");
return cookie;
}

private String extractRefreshTokenFromCookie(HttpServletRequest request) {
return Arrays.stream(request.getCookies())
.filter(cookie -> cookie.getName().equals("refreshToken"))
Expand Down

0 comments on commit feb5e52

Please sign in to comment.