summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-fw
diff options
context:
space:
mode:
Diffstat (limited to 'ecomp-sdk/epsdk-fw')
-rw-r--r--ecomp-sdk/epsdk-fw/pom.xml4
-rw-r--r--ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/SessionCommunicationService.java8
2 files changed, 10 insertions, 2 deletions
diff --git a/ecomp-sdk/epsdk-fw/pom.xml b/ecomp-sdk/epsdk-fw/pom.xml
index cc9b66af..cc950f12 100644
--- a/ecomp-sdk/epsdk-fw/pom.xml
+++ b/ecomp-sdk/epsdk-fw/pom.xml
@@ -6,7 +6,7 @@
<parent>
<groupId>org.onap.portal.sdk</groupId>
<artifactId>epsdk-project</artifactId>
- <version>2.5.0</version>
+ <version>2.6.0-SNAPSHOT</version>
</parent>
<!-- GroupId is inherited from parent -->
@@ -72,7 +72,7 @@
<dependency>
<groupId>org.onap.portal.sdk</groupId>
<artifactId>epsdk-logger</artifactId>
- <version>2.5.0</version>
+ <version>2.6.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.onap.aaf.authz</groupId>
diff --git a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/SessionCommunicationService.java b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/SessionCommunicationService.java
index e016db07..847707bc 100644
--- a/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/SessionCommunicationService.java
+++ b/ecomp-sdk/epsdk-fw/src/main/java/org/onap/portalsdk/core/onboarding/crossapi/SessionCommunicationService.java
@@ -41,6 +41,7 @@ import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
+import java.util.Base64;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -81,6 +82,9 @@ public class SessionCommunicationService {
con.setRequestProperty("username", userName);
con.setRequestProperty("password", password);
con.setRequestProperty("uebkey", uebKey);
+
+ String encoding = Base64.getEncoder().encodeToString((userName + ":" + password).getBytes());
+ con.setRequestProperty("Authorization", "Basic " + encoding);
int responseCode = con.getResponseCode();
if (logger.isDebugEnabled()) {
@@ -138,6 +142,10 @@ public class SessionCommunicationService {
con.setRequestProperty("password", password);
con.setRequestProperty("uebkey", uebKey);
con.setRequestProperty("sessionMap", sessionTimeoutMap);
+
+ String encoding = Base64.getEncoder().encodeToString((userName + ":" + password).getBytes());
+ con.setRequestProperty("Authorization", "Basic " + encoding);
+
con.setDoInput(true);
con.setDoOutput(true);
con.getOutputStream().write(sessionTimeoutMap.getBytes());