Skip to content

Commit

Permalink
fix: 사용자 세션 갱신 시, device name -> device id 인자값 수정 (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
psychology50 authored Oct 17, 2024
1 parent 9067ce7 commit 651ee99
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,13 @@ private Principal authenticateUser(StompHeaderAccessor accessor, Long userId, Lo

private void activateUserSession(UserPrincipal principal) {
if (userSessionService.isExists(principal.getUserId(), principal.getDeviceId())) {
log.info("[인증 핸들러] 사용자 세션을 업데이트합니다. userId: {}, deviceId: {}", principal.getUserId(), principal.getDeviceId());
userSessionService.updateUserStatus(principal.getUserId(), principal.getDeviceName(), UserStatus.ACTIVE_APP);
log.info("[인증 핸들러] 사용자 세션을 갱신합니다. userId: {}, deviceId: {}", principal.getUserId(), principal.getDeviceId());
userSessionService.updateUserStatus(principal.getUserId(), principal.getDeviceId(), UserStatus.ACTIVE_APP);
log.info("[인증 핸들러] 사용자 세션을 갱신했습니다. userId: {}, deviceId: {}", principal.getUserId(), principal.getDeviceId());
} else {
log.info("[인증 핸들러] 사용자 세션을 생성합니다. userId: {}, deviceId: {}", principal.getUserId(), principal.getDeviceId());
userSessionService.create(principal.getUserId(), principal.getDeviceId(), UserSession.of(principal.getDeviceId(), principal.getDeviceName()));
log.info("[인증 핸들러] 사용자 세션을 생성했습니다. userId: {}, deviceId: {}", principal.getUserId(), principal.getDeviceId());
}
}
}

0 comments on commit 651ee99

Please sign in to comment.