Skip to content

Commit

Permalink
💩 修复s一样的代码
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangyd-c committed Sep 22, 2021
1 parent 522ebbf commit 544ffd5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/me/zhyd/oauth/request/AuthFeishuRequest.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private String getAppAccessToken() {
requestObject.put("app_id", config.getClientId());
requestObject.put("app_secret", config.getClientSecret());
String response = new HttpUtils(config.getHttpConfig()).post(url, requestObject.toJSONString(), new HttpHeader()
.add("Content-Type", "application/json"));
.add("Content-Type", "application/json")).getBody();
JSONObject jsonObject = JSON.parseObject(response);
this.checkResponse(jsonObject);
String appAccessToken = jsonObject.getString("app_access_token");
Expand All @@ -80,7 +80,7 @@ protected AuthUser getUserInfo(AuthToken authToken) {
String accessToken = authToken.getAccessToken();
String response = new HttpUtils(config.getHttpConfig()).get(source.userInfo(), null, new HttpHeader()
.add("Content-Type", "application/json")
.add("Authorization", "Bearer " + accessToken), false);
.add("Authorization", "Bearer " + accessToken), false).getBody();
JSONObject object = JSON.parseObject(response);
this.checkResponse(object);
JSONObject data = object.getJSONObject("data");
Expand Down Expand Up @@ -112,7 +112,7 @@ public AuthResponse refresh(AuthToken authToken) {

private AuthToken getToken(JSONObject param, String url) {
String response = new HttpUtils(config.getHttpConfig()).post(url, param.toJSONString(), new HttpHeader()
.add("Content-Type", "application/json"));
.add("Content-Type", "application/json")).getBody();
JSONObject jsonObject = JSON.parseObject(response);
this.checkResponse(jsonObject);
JSONObject data = jsonObject.getJSONObject("data");
Expand Down

0 comments on commit 544ffd5

Please sign in to comment.