From 073e7d6b1680171346f8e8beb6710ae5b71a8a76 Mon Sep 17 00:00:00 2001 From: Mvbbb Date: Wed, 15 Sep 2021 12:50:25 +0800 Subject: [PATCH] :bug: reslove compatibility of new simple-http util --- .../src/main/java/com/fujieid/jap/oauth2/Oauth2Util.java | 4 ++-- jap-oidc/src/main/java/com/fujieid/jap/oidc/OidcUtil.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jap-oauth2/src/main/java/com/fujieid/jap/oauth2/Oauth2Util.java b/jap-oauth2/src/main/java/com/fujieid/jap/oauth2/Oauth2Util.java index de84124..5461013 100644 --- a/jap-oauth2/src/main/java/com/fujieid/jap/oauth2/Oauth2Util.java +++ b/jap-oauth2/src/main/java/com/fujieid/jap/oauth2/Oauth2Util.java @@ -214,9 +214,9 @@ public class Oauth2Util { String res = null; if (null == endpointMethodType || Oauth2EndpointMethodType.GET == endpointMethodType) { - res = HttpUtil.get(url, params, false); + res = HttpUtil.get(url, params, false).getBody(); } else { - res = HttpUtil.post(url, params, false); + res = HttpUtil.post(url, params, false).getBody(); } return JsonUtil.parseKv(res); } diff --git a/jap-oidc/src/main/java/com/fujieid/jap/oidc/OidcUtil.java b/jap-oidc/src/main/java/com/fujieid/jap/oidc/OidcUtil.java index a52bfdb..346b01e 100644 --- a/jap-oidc/src/main/java/com/fujieid/jap/oidc/OidcUtil.java +++ b/jap-oidc/src/main/java/com/fujieid/jap/oidc/OidcUtil.java @@ -45,7 +45,7 @@ public class OidcUtil { String response = null; try { - response = HttpUtil.get(discoveryUrl); + response = HttpUtil.get(discoveryUrl).getBody(); } catch (Exception e) { throw new OidcException("Cannot access discovery url: " + discoveryUrl); }