提交 56df9bc1 编写于 作者: S skqing

针对钉钉登录增加AuthToken属性

上级 43866062
...@@ -51,11 +51,15 @@ public class AuthDingTalkRequest extends BaseAuthRequest { ...@@ -51,11 +51,15 @@ public class AuthDingTalkRequest extends BaseAuthRequest {
throw new AuthException(errorCode.getDesc()); throw new AuthException(errorCode.getDesc());
} }
object = object.getJSONObject("user_info"); object = object.getJSONObject("user_info");
AuthToken token = AuthToken.builder()
.openId(object.getString("openid"))
.build();
return AuthUser.builder() return AuthUser.builder()
.uuid(object.getString("openid")) .uuid(object.getString("unionid"))
.nickname(object.getString("nick")) .nickname(object.getString("nick"))
.username(object.getString("nick")) .username(object.getString("nick"))
.source(AuthSource.DINGTALK) .source(AuthSource.DINGTALK)
.token(token)
.build(); .build();
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册