From 904e475f2f14f421aaead289f7fa4b219e7765d5 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Thu, 18 Nov 2021 16:53:59 +0100 Subject: [PATCH] Removed old commented code --- .../org/gcube/gcat/social/PortalUser.java | 27 ------------------- 1 file changed, 27 deletions(-) diff --git a/src/main/java/org/gcube/gcat/social/PortalUser.java b/src/main/java/org/gcube/gcat/social/PortalUser.java index 8618109..3e00a30 100644 --- a/src/main/java/org/gcube/gcat/social/PortalUser.java +++ b/src/main/java/org/gcube/gcat/social/PortalUser.java @@ -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 {