Skip to content

Commit

Permalink
Merge pull request #204 from OutDecision/issue/197
Browse files Browse the repository at this point in the history
[UPDATE]: 로그인 쿠키 수정
  • Loading branch information
baeksom authored May 26, 2024
2 parents 771b0b0 + 41207ef commit f4ca3c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public String generateRefreshToken(String email, String role) {


public String generateAccessToken(String email, String role) {
// long tokenPeriod = 1000L * 60L * 30L; // 30분
long tokenPeriod = 1000L * 10L;
long tokenPeriod = 1000L * 60L * 30L; // 30분

Claims claims = Jwts.claims().setSubject(email);
claims.put("role", role);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
log.info("jwtToken = {}", token.getAccessToken());

// 쿠키로 accessToken 전달
addCookie(response, "Authorization", token.getAccessToken(), 60*5);
addCookie(response, "Authorization", token.getAccessToken(), 60*60);

// 로그인 확인 페이지로 리다이렉트 시킨다.
log.info("일반 로그인 redirect 준비");
Expand Down

0 comments on commit f4ca3c7

Please sign in to comment.