Skip to content

Commit

Permalink
쿠키 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
HeeSung98 committed Nov 28, 2023
1 parent 4b602c6 commit 309d2d1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo
Cookie cookieToken = new Cookie("token", token);
cookieToken.setHttpOnly(false); // JavaScript를 통한 쿠키 접근을 막기 위해 사용
cookieToken.setMaxAge(3 * 60 * 60);
cookieToken.setSecure(true);
response.addCookie(cookieToken);

String userinfo = authUserDTO.getEmail() + "|" + authUserDTO.getName() + "|" + authUserDTO.getImage();
Cookie cookieUserinfo = new Cookie("userinfo", userinfo);
cookieUserinfo.setHttpOnly(false);
cookieToken.setSecure(true);
cookieUserinfo.setMaxAge(3 * 60 * 60);
response.addCookie(cookieUserinfo);

Expand Down

0 comments on commit 309d2d1

Please sign in to comment.