Fix DeleteSliceService auth 19/123019/1
authordeepikasatheesh <deepika.s84@wipro.com>
Fri, 30 Jul 2021 17:41:14 +0000 (17:41 +0000)
committerdeepikasatheesh <deepika.s84@wipro.com>
Fri, 30 Jul 2021 17:41:14 +0000 (17:41 +0000)
Issue-ID: SO-3722

Signed-off-by: deepikasatheesh <deepika.s84@wipro.com>
Change-Id: Ic988164e40d20429a0ff4ae95456351d4d1b195c

bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DeleteCommunicationService.groovy

index d00f349..a1acbb3 100644 (file)
@@ -215,13 +215,15 @@ class DeleteCommunicationService extends AbstractServiceTaskProcessor {
             requestBody.replaceAll("\\s+", "")
 
             String msoKey = UrnPropertiesReader.getVariable("mso.msoKey", execution)
-            String basicAuth =  UrnPropertiesReader.getVariable("mso.infra.endpoint.auth", execution)
+            String basicAuth =  UrnPropertiesReader.getVariable("mso.adapters.po.auth", execution)
+            def authHeader = utils.getBasicAuth(basicAuth, msoKey)
+
 //            String basicAuthValue = utils.encrypt(basicAuth, msoKey)
 //            String encodeString = utils.getBasicAuth(basicAuthValue, msoKey)
 
             HttpClient httpClient = getHttpClientFactory().newJsonClient(new URL(url), ONAPComponents.SO)
 //            httpClient.addAdditionalHeader("Authorization", encodeString)
-            httpClient.addAdditionalHeader("Authorization", basicAuth)
+            httpClient.addAdditionalHeader("Authorization", authHeader)
             httpClient.addAdditionalHeader("Accept", "application/json")
             Response httpResponse = httpClient.delete(requestBody)
             handleNSSMFWFResponse(httpResponse, execution)