1
0
mirror of synced 2026-02-04 08:47:48 +08:00

Merge pull request #166 from christxlx/master

fix: bug 58-63 scope在微软最新的文档中要求必须用空格隔开,form构建时候空格会被强制转换为%20,所以此处重新覆盖
This commit is contained in:
yadong.zhang
2023-12-03 21:04:10 +08:00
committed by GitHub

View File

@@ -54,6 +54,13 @@ public abstract class AbstractAuthMicrosoftRequest extends AuthDefaultRequest {
Map<String, String> form = MapUtil.parseStringToMap(accessTokenUrl, false);
//scope在微软最新的文档中要求必须用空格隔开,form构建时候空格会被强制转换为%20,所以此处重新覆盖
String scope = form.get("scope");
if (scope != null){
String replace = scope.replaceAll("%20"," ");
form.put("scope",replace);
}
String response = new HttpUtils(config.getHttpConfig()).post(accessTokenUrl, form, httpHeader, false).getBody();
JSONObject accessTokenObject = JSONObject.parseObject(response);