summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-fw/src/main/java
diff options
context:
space:
mode:
authorKishore Reddy, Gujja (kg811t) <kg811t@research.att.com>2018-07-09 13:41:00 -0400
committerKishore Reddy, Gujja (kg811t) <kg811t@research.att.com>2018-07-11 13:20:28 -0400
commita96a3e49cd472aa902c22143358b87562603d47c (patch)
tree7e97578788de44f6704252cf982af09adcc05e8d /ecomp-sdk/epsdk-fw/src/main/java
parent9ac542482e4710e5566d147ca7a7a42500628ba2 (diff)
Adding User Auth and permission aaf services
Issue-ID: PORTAL-334 Change-Id: I2826f2a06f7d818d918ae5f45b500a8da78cec42 Signed-off-by: Kishore Reddy, Gujja (kg811t) <kg811t@research.att.com>
Diffstat (limited to 'ecomp-sdk/epsdk-fw/src/main/java')
-rw-r--r--ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/PortalRestAPIProxy.java1
-rw-r--r--ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/RestWebServiceClient.java3
2 files changed, 4 insertions, 0 deletions
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);