针对钉钉登录增加AuthToken属性

This commit is contained in:
skqing 2019-06-18 14:55:28 +08:00
parent 438660621e
commit 56df9bc1b0

View File

@ -51,11 +51,15 @@ public class AuthDingTalkRequest extends BaseAuthRequest {
throw new AuthException(errorCode.getDesc());
}
object = object.getJSONObject("user_info");
AuthToken token = AuthToken.builder()
.openId(object.getString("openid"))
.build();
return AuthUser.builder()
.uuid(object.getString("openid"))
.uuid(object.getString("unionid"))
.nickname(object.getString("nick"))
.username(object.getString("nick"))
.source(AuthSource.DINGTALK)
.token(token)
.build();
}
}