Skip to content

Commit

Permalink
💩 补全抖音平台缺失字段补全。Github#188
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyd-c committed Aug 3, 2024
1 parent 74b5b4b commit 15b1a97
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/me/zhyd/oauth/request/AuthDouyinRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ protected AuthUser getUserInfo(AuthToken authToken) {
JSONObject userInfoObject = JSONObject.parseObject(response);
this.checkResponse(userInfoObject);
JSONObject object = userInfoObject.getJSONObject("data");
authToken.setUnionId(object.getString("union_id"));
return AuthUser.builder()
.rawUserInfo(object)
.uuid(object.getString("union_id"))
Expand Down Expand Up @@ -96,6 +97,7 @@ private AuthToken getToken(String accessTokenUrl) {
.openId(dataObj.getString("open_id"))
.expireIn(dataObj.getIntValue("expires_in"))
.refreshToken(dataObj.getString("refresh_token"))
.refreshTokenExpireIn(dataObj.getIntValue("refresh_expires_in"))
.scope(dataObj.getString("scope"))
.build();
}
Expand Down

0 comments on commit 15b1a97

Please sign in to comment.