summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-BE-os/src
diff options
context:
space:
mode:
authorIkramullah, Ikram (fi241c) <fi241c@att.com>2020-05-22 13:11:56 -0400
committerMuni Mohan Kunchi <munmohan@att.com>2020-06-08 11:25:23 -0400
commit230c71614b1d2fb71a8fb482c749ff5a6dad65d8 (patch)
tree6d766ce33b71c0cc2d473afbfcc55f79fed9d469 /ecomp-portal-BE-os/src
parente276ad30dc38f55e06877df8fd0d3372534c8f47 (diff)
fixes for supporting non-gui application access provisioning
Issue-ID: PORTAL-909 Change-Id: I760eb93966cec6d2cf9a24f06e3424ab867b38f6 Signed-off-by: Muni Mohan Kunchi <munmohan@att.com>
Diffstat (limited to 'ecomp-portal-BE-os/src')
-rw-r--r--ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java4
-rw-r--r--ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java18
2 files changed, 11 insertions, 11 deletions
diff --git a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java
index a24a6b4c..8b92b58c 100644
--- a/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java
+++ b/ecomp-portal-BE-os/src/main/java/org/onap/portalapp/service/RemoteWebServiceCallServiceImpl.java
@@ -69,8 +69,8 @@ public class RemoteWebServiceCallServiceImpl extends WebServiceCallServiceImpl i
return false;
}
- String encryptedPwdDB = appRecord.getAppPassword();
- String appUserName = appRecord.getUsername();
+ String encryptedPwdDB = appRecord.getAppBasicAuthPassword();
+ String appUserName = appRecord.getAppBasicAuthUsername();
String decryptedPwd = CipherUtil.decryptPKC(encryptedPwdDB,
secretKey == null ? SystemProperties.getProperty(SystemProperties.Decryption_Key) : secretKey);
if (decryptedPwd.equals(requestPassword) && appUserName.equals(requestAppName))
diff --git a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java
index 88ccf5d1..5b7f7d45 100644
--- a/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java
+++ b/ecomp-portal-BE-os/src/test/java/org/onap/portalapp/portal/service/RemoteWebServiceCallServiceImplTest.java
@@ -97,7 +97,7 @@ public class RemoteWebServiceCallServiceImplTest {
String criteria= " where ueb_key = 'requestUebKey'";
List<EPApp> appList = new ArrayList<>();
EPApp app = new EPApp();
- app.setAppPassword("password");
+ app.setAppBasicAuthPassword("password");
appList.add(app);
Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(appList);
String secretKey = null;
@@ -115,8 +115,8 @@ public class RemoteWebServiceCallServiceImplTest {
String criteria= " where ueb_key = 'requestUebKey'";
List<EPApp> appList = new ArrayList<>();
EPApp app = new EPApp();
- app.setAppPassword("password");
- app.setUsername("requestAppName");
+ app.setAppBasicAuthPassword("password");
+ app.setAppBasicAuthUsername("requestAppName");
appList.add(app);
Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(appList);
String secretKey = null;
@@ -134,8 +134,8 @@ public class RemoteWebServiceCallServiceImplTest {
String criteria= " where ueb_key = 'requestUebKey'";
List<EPApp> appList = new ArrayList<>();
EPApp app = new EPApp();
- app.setAppPassword("password");
- app.setUsername("requestAppName");
+ app.setAppBasicAuthPassword("password");
+ app.setAppBasicAuthUsername("requestAppName");
appList.add(app);
Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(null);
String secretKey = null;
@@ -160,8 +160,8 @@ public class RemoteWebServiceCallServiceImplTest {
// String criteria= " where ueb_key = 'requestUebKey'";
List<EPApp> appList = new ArrayList<>();
EPApp app = new EPApp();
- app.setAppPassword("password");
- app.setUsername("requestAppName");
+ app.setAppBasicAuthPassword("password");
+ app.setAppBasicAuthUsername("requestAppName");
appList.add(app);
Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(null);
assertFalse(remoteWebServiceCallServiceImpl.verifyAppKeyCredential("test"));
@@ -175,8 +175,8 @@ public class RemoteWebServiceCallServiceImplTest {
String criteria= " where ueb_key = 'test'";
List<EPApp> appList = new ArrayList<>();
EPApp app = new EPApp();
- app.setAppPassword("password");
- app.setUsername("requestAppName");
+ app.setAppBasicAuthPassword("password");
+ app.setAppBasicAuthUsername("requestAppName");
appList.add(app);
Mockito.when(dataAccessService.getList(EPApp.class, criteria.toString(), null, null)).thenReturn(appList);
assertTrue(remoteWebServiceCallServiceImpl.verifyAppKeyCredential("test"));