From a96a3e49cd472aa902c22143358b87562603d47c Mon Sep 17 00:00:00 2001 From: "Kishore Reddy, Gujja (kg811t)" Date: Mon, 9 Jul 2018 13:41:00 -0400 Subject: Adding User Auth and permission aaf services Issue-ID: PORTAL-334 Change-Id: I2826f2a06f7d818d918ae5f45b500a8da78cec42 Signed-off-by: Kishore Reddy, Gujja (kg811t) --- .../onap/portalsdk/core/onboarding/crossapi/PortalRestAPIProxy.java | 1 + .../org/onap/portalsdk/core/onboarding/rest/RestWebServiceClient.java | 3 +++ 2 files changed, 4 insertions(+) (limited to 'ecomp-sdk/epsdk-fw/src/main/java') diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/PortalRestAPIProxy.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/PortalRestAPIProxy.java index 49b3deaa..8d797c37 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/PortalRestAPIProxy.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/PortalRestAPIProxy.java @@ -187,6 +187,7 @@ public class PortalRestAPIProxy extends HttpServlet implements IPortalRestAPISer // add user ID bodyMap.put("userid", userId); requestBody = mapper.writeValueAsString(bodyMap); + logger.debug("doPost: StoreAnalytics requestbody: "+ requestBody); responseJson = RestWebServiceClient.getInstance().postPortalContent(storeAnalyticsContextPath, userId, appName, null, appUserName, appPassword, "application/json", requestBody, true); logger.debug("doPost: postPortalContent returns " + responseJson); diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/RestWebServiceClient.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/RestWebServiceClient.java index 7121bd8c..a5608746 100644 --- a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/RestWebServiceClient.java +++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/RestWebServiceClient.java @@ -215,6 +215,7 @@ public class RestWebServiceClient { } con.setRequestProperty("user-agent", appName); con.setRequestProperty("X-ECOMP-RequestID", requestId); + logger.debug("Post: X-ECOMP-RequestID: "+ requestId); con.setRequestProperty("username", appUserName); con.setRequestProperty("password", appPassword); if (useBasicAuth) { @@ -266,6 +267,7 @@ public class RestWebServiceClient { public String postPortalContent(String restPath, String userId, String appName, String requestId, String appUserName, String appPassword, String contentType, String content, boolean isBasicAuth) throws IOException { + logger.debug("postPortalContent: requestBody for "+restPath +"is: "+ content ); String restURL = PortalApiProperties.getProperty(PortalApiConstants.ECOMP_REST_URL); if (restURL == null) { @@ -355,6 +357,7 @@ public class RestWebServiceClient { con.setRequestProperty("user-agent", appName); con.setRequestProperty("X-ECOMP-RequestID", requestId); con.setRequestProperty("Content-Type", contentType); + logger.debug("Post: X-ECOMP-RequestID: "+ requestId); if (isBasicAuth) { String encoding = Base64.getEncoder().encodeToString((appUserName + ":" + appPassword).getBytes()); con.setRequestProperty("Authorization", "Basic " + encoding); -- cgit 1.2.3-korg