JsonUtils rename method name

This commit is contained in:
MaxKey
2022-09-18 10:41:43 +08:00
parent 5617aa5c94
commit d22358bb98
29 changed files with 50 additions and 50 deletions

View File

@@ -68,7 +68,7 @@ public class OAuthDefaultUserInfoAdapter extends AbstractAuthorizeAdapter {
beanMap.put("institution", userInfo.getInstId());
beanMap.put(WebConstants.ONLINE_TICKET_NAME, principal.getSession().getFormattedId());
String info= JsonUtils.object2Json(beanMap);
String info= JsonUtils.toString(beanMap);
return info;
}

View File

@@ -90,7 +90,7 @@ public class UserInfoEndpoint {
}
if (!StringGenerator.uuidMatches(access_token)) {
httpResponseAdapter.write(response,JsonUtils.gson2Json(accessTokenFormatError(access_token)),"json");
httpResponseAdapter.write(response,JsonUtils.gsonToString(accessTokenFormatError(access_token)),"json");
}
OAuth2Authentication oAuth2Authentication =null;
@@ -123,7 +123,7 @@ public class UserInfoEndpoint {
HashMap<String,Object>authzException=new HashMap<String,Object>();
authzException.put(OAuth2Exception.ERROR, e.getOAuth2ErrorCode());
authzException.put(OAuth2Exception.DESCRIPTION,e.getMessage());
httpResponseAdapter.write(response,JsonUtils.gson2Json(authzException),"json");
httpResponseAdapter.write(response,JsonUtils.gsonToString(authzException),"json");
}
}

View File

@@ -105,7 +105,7 @@ public class UserInfoOIDCEndpoint {
String access_token = AuthorizationHeaderUtils.resolveBearer(request);
if (!StringGenerator.uuidMatches(access_token)) {
return JsonUtils.gson2Json(accessTokenFormatError(access_token));
return JsonUtils.gsonToString(accessTokenFormatError(access_token));
}
String principal="";
@@ -275,7 +275,7 @@ public class UserInfoOIDCEndpoint {
HashMap<String,Object>authzException=new HashMap<String,Object>();
authzException.put(OAuth2Exception.ERROR, e.getOAuth2ErrorCode());
authzException.put(OAuth2Exception.DESCRIPTION,e.getMessage());
return JsonUtils.object2Json(authzException);
return JsonUtils.toString(authzException);
}
}