Skip to content

Commit

Permalink
#1119 开放平台模块getAuthorizerList方法里自动刷新refreshToken
Browse files Browse the repository at this point in the history
  • Loading branch information
007gzs authored and binarywang committed Jul 18, 2019
1 parent 55ce138 commit eb6b09c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,17 @@ public WxOpenAuthorizerListResult getAuthorizerList(int begin, int len) throws W
jsonObject.addProperty("offset", begin);
jsonObject.addProperty("count", len);
String responseContent = post(url, jsonObject.toString());
return WxOpenGsonBuilder.create().fromJson(responseContent, WxOpenAuthorizerListResult.class);
WxOpenAuthorizerListResult ret = WxOpenGsonBuilder.create().fromJson(responseContent, WxOpenAuthorizerListResult.class);
if(ret != null && ret.getList() != null){
for(Map<String, String> data : ret.getList()){
String authorizerAppid = data.get("authorizer_appid");
String refreshToken = data.get("refresh_token");
if(authorizerAppid != null && refreshToken != null){
this.getWxOpenConfigStorage().setAuthorizerRefreshToken(authorizerAppid, refreshToken);
}
}
}
return ret;
}

@Override
Expand Down

0 comments on commit eb6b09c

Please sign in to comment.