Skip to content

Commit

Permalink
feat(session): session 정보 로그 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
junhyeongkim2 committed Oct 28, 2024
1 parent 32b5b01 commit 308c3e7
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ public ResponseEntity<String> deleteUser(@AuthenticationPrincipal final CustomOA
@GetMapping("/test/redirect")
public String testRedirect(HttpSession session, @RequestParam String deviceToken, Model model) {
log.info("현재 세션 ID: {}", session.getId());

log.info("현재 세션 정보:");
log.info("ID: {}", session.getId());
log.info("생성시간: {}", new Date(session.getCreationTime()));
log.info("마지막접근: {}", new Date(session.getLastAccessedTime()));


// 세션 만료시키기
model.addAttribute("deviceToken", deviceToken);
session.invalidate();
Expand All @@ -85,6 +92,7 @@ public String testRedirect(HttpSession session, @RequestParam String deviceToken

@GetMapping("/after/redirect")
public String afterRedirect(HttpServletRequest request) {

log.info("리다이렉트 후 URL: {}", request.getRequestURL());
log.info("전체 URI: {}", request.getRequestURI());
log.info("쿼리스트링: {}", request.getQueryString());
Expand Down

0 comments on commit 308c3e7

Please sign in to comment.