提交 90f8d01c 编写于 作者: 智布道's avatar 智布道 👁

🍻 增加用户的UUID

上级 0237cb38
......@@ -48,6 +48,9 @@ public class AuthAlipayRequest extends BaseAuthRequest {
}
return AuthToken.builder()
.accessToken(response.getAccessToken())
.uid(response.getUserId())
.expireIn(Integer.parseInt(response.getExpiresIn()))
.refreshToken(response.getRefreshToken())
.build();
}
......@@ -67,6 +70,7 @@ public class AuthAlipayRequest extends BaseAuthRequest {
String province = response.getProvince(),
city = response.getCity();
return AuthUser.builder()
.uuid(response.getUserId())
.username(response.getUserName())
.nickname(response.getNickName())
.avatar(response.getAvatar())
......
......@@ -47,6 +47,7 @@ public class AuthBaiduRequest extends BaseAuthRequest {
throw new AuthException(errorCode.getDesc());
}
return AuthUser.builder()
.uuid(object.getString("userid"))
.username(object.getString("username"))
.nickname(object.getString("username"))
.gender(AuthUserGender.getRealGender(object.getString("sex")))
......
......@@ -47,6 +47,7 @@ public class AuthCodingRequest extends BaseAuthRequest {
}
object = object.getJSONObject("data");
return AuthUser.builder()
.uuid(object.getString("id"))
.username(object.getString("name"))
.avatar("https://coding.net/" + object.getString("avatar"))
.blog("https://coding.net/" + object.getString("path"))
......
......@@ -51,6 +51,7 @@ public class AuthDingTalkRequest extends BaseAuthRequest {
}
object = object.getJSONObject("user_info");
return AuthUser.builder()
.uuid(object.getStr("openid"))
.nickname(object.getStr("nick"))
.username(object.getStr("nick"))
.source(AuthSource.DINGTALK)
......
......@@ -46,6 +46,7 @@ public class AuthOschinaRequest extends BaseAuthRequest {
throw new AuthException(object.getString("error_description"));
}
return AuthUser.builder()
.uuid(object.getString("id"))
.username(object.getString("name"))
.nickname(object.getString("name"))
.avatar(object.getString("avatar"))
......
......@@ -48,6 +48,7 @@ public class AuthTaobaoRequest extends BaseAuthRequest {
String nick = GlobalAuthUtil.urlDecode(object.getString("taobao_user_nick"));
return AuthUser.builder()
.uuid(object.getString("taobao_user_id"))
.username(nick)
.nickname(nick)
.gender(AuthUserGender.UNKNOW)
......
......@@ -47,6 +47,7 @@ public class AuthTencentCloudRequest extends BaseAuthRequest {
}
object = object.getJSONObject("data");
return AuthUser.builder()
.uuid(object.getString("id"))
.username(object.getString("name"))
.avatar("https://dev.tencent.com/" + object.getString("avatar"))
.blog("https://dev.tencent.com/" + object.getString("path"))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册