Removed old commented code
This commit is contained in:
parent
8d1fc7f045
commit
904e475f2f
|
@ -24,9 +24,6 @@ public class PortalUser {
|
|||
protected static final String RESPONSE_MESSAGE_KEY = "message";
|
||||
protected static final String RESPONSE_RESULT_KEY = "result";
|
||||
|
||||
// https://wiki.gcube-system.org/gcube/Social_Networking_Service
|
||||
// private static final String SOCIAL_SERVICE_GET_GCUBE_USER_PROFILE_PATH = "2/users/get-profile";
|
||||
|
||||
protected static final String SOCIAL_SERVICE_GET_OAUTH_USER_PROFILE_PATH = "2/users/get-oauth-profile";
|
||||
|
||||
// This key contains the fullname
|
||||
|
@ -58,30 +55,6 @@ public class PortalUser {
|
|||
this.objectMapper = new ObjectMapper();
|
||||
}
|
||||
|
||||
/*
|
||||
private JsonNode validateGCubeUserProfileResponse(JsonNode jsonNode) {
|
||||
if(jsonNode.get(RESPONSE_SUCCESS_KEY).asBoolean()) {
|
||||
return jsonNode.get(RESPONSE_RESULT_KEY);
|
||||
} else {
|
||||
String message = jsonNode.get(RESPONSE_MESSAGE_KEY).asText();
|
||||
throw new InternalServerErrorException(message);
|
||||
}
|
||||
}
|
||||
|
||||
private JsonNode getGCubeUserProfile() throws Exception {
|
||||
if(gCubeUserProfile == null) {
|
||||
String socialServiceBasePath = SocialServiceDiscovery.getCurrentScopeSocialServiceBasePath();
|
||||
GXHTTPStringRequest gxhttpStringRequest = HTTPUtility.createGXHTTPStringRequest(socialServiceBasePath,
|
||||
SOCIAL_SERVICE_GET_GCUBE_USER_PROFILE_PATH, false);
|
||||
HttpURLConnection httpURLConnection = gxhttpStringRequest.get();
|
||||
String ret = HTTPUtility.getResultAsString(httpURLConnection);
|
||||
JsonNode jsonNode = objectMapper.readTree(ret);
|
||||
gCubeUserProfile = validateGCubeUserProfileResponse(jsonNode);
|
||||
}
|
||||
return gCubeUserProfile;
|
||||
}
|
||||
*/
|
||||
|
||||
public JsonNode getOAuthUserProfile() {
|
||||
if(oAuthUserProfile == null) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue