JsonUtils rename method name
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user