diff options
Diffstat (limited to 'ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/RestWebServiceClient.java')
-rw-r--r-- | ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/rest/RestWebServiceClient.java | 17 |
1 files changed, 9 insertions, 8 deletions
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 a5608746..dce26752 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 @@ -47,6 +47,7 @@ import java.util.UUID; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; +import org.onap.portalsdk.core.onboarding.crossapi.IPortalRestCentralService; import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; import org.onap.portalsdk.core.onboarding.util.PortalApiProperties; import org.owasp.esapi.ESAPI; @@ -216,8 +217,8 @@ 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); + con.setRequestProperty(IPortalRestCentralService.CREDENTIALS_USER, appUserName); + con.setRequestProperty(IPortalRestCentralService.CREDENTIALS_PASS, appPassword); if (useBasicAuth) { String encoding = Base64.getEncoder().encodeToString((appUserName + ":" + appPassword).getBytes()); con.setRequestProperty("Authorization", "Basic " + encoding); @@ -348,11 +349,11 @@ public class RestWebServiceClient { Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT))); // add request header - con.setRequestProperty("uebkey", appUebKey); + con.setRequestProperty(IPortalRestCentralService.CREDENTIALS_UEB, appUebKey); if (appUserName != null) - con.setRequestProperty("username", appUserName); + con.setRequestProperty(IPortalRestCentralService.CREDENTIALS_USER, appUserName); if (appPassword != null) - con.setRequestProperty("password", appPassword); + con.setRequestProperty(IPortalRestCentralService.CREDENTIALS_PASS, appPassword); con.setRequestProperty("LoginId", loginId); con.setRequestProperty("user-agent", appName); con.setRequestProperty("X-ECOMP-RequestID", requestId); @@ -490,11 +491,11 @@ public class RestWebServiceClient { Integer.parseInt(PortalApiProperties.getProperty(PortalApiConstants.EXT_REQUEST_READ_TIMEOUT))); // add request header - con.setRequestProperty("uebkey", appUebKey); + con.setRequestProperty(IPortalRestCentralService.CREDENTIALS_UEB, appUebKey); if (appUserName != null) - con.setRequestProperty("username", appUserName); + con.setRequestProperty(IPortalRestCentralService.CREDENTIALS_USER, appUserName); if (appPassword != null) - con.setRequestProperty("password", appPassword); + con.setRequestProperty(IPortalRestCentralService.CREDENTIALS_PASS, appPassword); con.setRequestProperty("LoginId", loginId); con.setRequestProperty("user-agent", appName); con.setRequestProperty("X-ECOMP-RequestID", requestId); |