From 633265e0952024b76ce634ec41be835bca64cf0c Mon Sep 17 00:00:00 2001 From: shinhn Date: Fri, 13 Jan 2023 19:06:29 +0900 Subject: [PATCH] =?UTF-8?q?#24=20Feat=20:=20=EC=95=A0=ED=94=8C=20=ED=9A=8C?= =?UTF-8?q?=EC=9B=90=EA=B0=80=EC=9E=85=20=EB=B0=8F=20=EB=A1=9C=EA=B7=B8?= =?UTF-8?q?=EC=9D=B8=20res=EC=97=90=20UserStatus.LOGIN=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/yogit/server/applelogin/model/TokenResponse.java | 2 ++ .../com/yogit/server/applelogin/service/AppleServiceImpl.java | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/server/src/main/java/com/yogit/server/applelogin/model/TokenResponse.java b/server/src/main/java/com/yogit/server/applelogin/model/TokenResponse.java index 48ed28f..ab520a1 100644 --- a/server/src/main/java/com/yogit/server/applelogin/model/TokenResponse.java +++ b/server/src/main/java/com/yogit/server/applelogin/model/TokenResponse.java @@ -1,6 +1,7 @@ package com.yogit.server.applelogin.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.yogit.server.user.entity.UserStatus; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -22,4 +23,5 @@ public class TokenResponse { private Account account; private Long userId; private String userName; + private UserStatus userStatus; } diff --git a/server/src/main/java/com/yogit/server/applelogin/service/AppleServiceImpl.java b/server/src/main/java/com/yogit/server/applelogin/service/AppleServiceImpl.java index 77b207c..6d3c547 100644 --- a/server/src/main/java/com/yogit/server/applelogin/service/AppleServiceImpl.java +++ b/server/src/main/java/com/yogit/server/applelogin/service/AppleServiceImpl.java @@ -93,6 +93,7 @@ else if (client_secret != null && code == null && refresh_token != null) { tokenResponse.setAccount(new Account(serviceResponse.getState(), code, tokenResponse.getId_token(), user, serviceResponse.getIdentifier(), serviceResponse.getHasRequirementInfo())); tokenResponse.setUserType(UserType.APPLE.toString()); + tokenResponse.setUserStatus(UserStatus.LOGIN); // userId 설정 if(refresh_token == null){ @@ -107,7 +108,6 @@ else if (client_secret != null && code == null && refresh_token != null) { findUser.changeUserStatus(UserStatus.LOGIN); } - return tokenResponse; }