From b44ef894cc3a990d3aba7393af7ed91d872e1f12 Mon Sep 17 00:00:00 2001 From: Siri-Ray <109605599+Siri-Ray@users.noreply.github.com> Date: Thu, 21 Nov 2024 23:48:36 +0800 Subject: [PATCH] (fix)(auth)jwt bug --- .../auth/api/authentication/pojo/UserWithPassword.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/auth/api/src/main/java/com/tencent/supersonic/auth/api/authentication/pojo/UserWithPassword.java b/auth/api/src/main/java/com/tencent/supersonic/auth/api/authentication/pojo/UserWithPassword.java index 2ebfd3d9a4..fc5dfbd056 100644 --- a/auth/api/src/main/java/com/tencent/supersonic/auth/api/authentication/pojo/UserWithPassword.java +++ b/auth/api/src/main/java/com/tencent/supersonic/auth/api/authentication/pojo/UserWithPassword.java @@ -11,6 +11,7 @@ import static com.tencent.supersonic.auth.api.authentication.constant.UserConstants.TOKEN_CREATE_TIME; import static com.tencent.supersonic.auth.api.authentication.constant.UserConstants.TOKEN_IS_ADMIN; import static com.tencent.supersonic.auth.api.authentication.constant.UserConstants.TOKEN_USER_DISPLAY_NAME; +import static com.tencent.supersonic.auth.api.authentication.constant.UserConstants.TOKEN_USER_EMAIL; import static com.tencent.supersonic.auth.api.authentication.constant.UserConstants.TOKEN_USER_ID; import static com.tencent.supersonic.auth.api.authentication.constant.UserConstants.TOKEN_USER_NAME; import static com.tencent.supersonic.auth.api.authentication.constant.UserConstants.TOKEN_USER_PASSWORD; @@ -38,6 +39,7 @@ public static Map convert(UserWithPassword user) { claims.put(TOKEN_USER_NAME, StringUtils.isEmpty(user.getName()) ? "" : user.getName()); claims.put(TOKEN_USER_PASSWORD, StringUtils.isEmpty(user.getPassword()) ? "" : user.getPassword()); + claims.put(TOKEN_USER_EMAIL, StringUtils.isEmpty(user.getEmail()) ? "" : user.getEmail()); claims.put(TOKEN_USER_DISPLAY_NAME, user.getDisplayName()); claims.put(TOKEN_CREATE_TIME, System.currentTimeMillis()); claims.put(TOKEN_IS_ADMIN, user.getIsAdmin());