Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

Commit

Permalink
fix: 로그인시 SessionUser 타입으로 세션에 저장되도록 변경 (#60)
Browse files Browse the repository at this point in the history
closes #58
  • Loading branch information
oksusutea authored Aug 19, 2021
1 parent 44b0e44 commit a5a4439
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/flab/kidsafer/utils/SessionUtil.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.flab.kidsafer.utils;

import com.flab.kidsafer.config.auth.dto.SessionUser;
import com.flab.kidsafer.domain.User;
import javax.servlet.http.HttpSession;

Expand All @@ -22,7 +23,8 @@ public static User getLoginUser(HttpSession session) {

public static void setLoginUserId(HttpSession session, User user) {
session.setAttribute(MEMBER_ID, user.getUserId());
session.setAttribute(USER, user);
SessionUser sessionUser = new SessionUser(user);
session.setAttribute(USER, sessionUser);
}

public static void clearSession(HttpSession session) {
Expand Down

0 comments on commit a5a4439

Please # to comment.