X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=ONAP-PDP-REST%2Fsrc%2Fmain%2Fjava%2Forg%2Fonap%2Fpolicy%2Fpdp%2Frest%2Fapi%2Fservices%2FPAPServices.java;h=516d873d44bd3ce1c7f19e7b1caaa00534b5f51b;hp=7704a96a6cdca443a251090fe74d5dc37e237720;hb=c2ca6ea5cb44103903e1409e8dd6db80167e61e8;hpb=c1b69dfb1297365d35f2ada8690f13f787d38b4f diff --git a/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/api/services/PAPServices.java b/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/api/services/PAPServices.java index 7704a96a6..516d873d4 100644 --- a/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/api/services/PAPServices.java +++ b/ONAP-PDP-REST/src/main/java/org/onap/policy/pdp/rest/api/services/PAPServices.java @@ -40,8 +40,8 @@ import org.apache.commons.io.IOUtils; import org.onap.policy.api.PolicyException; import org.onap.policy.common.logging.flexlogger.FlexLogger; import org.onap.policy.common.logging.flexlogger.Logger; -import org.onap.policy.pdp.rest.config.PDPApiAuth; -import org.onap.policy.rest.XACMLRestProperties; +import org.onap.policy.pdp.rest.restauth.AuthenticationService; +import org.onap.policy.rest.XacmlRestProperties; import org.onap.policy.utils.PeCryptoUtils; import org.onap.policy.xacml.api.XACMLErrorConstants; import org.onap.policy.xacml.std.pap.StdPDPPolicy; @@ -64,12 +64,12 @@ public class PAPServices { } public PAPServices() { - environment = PDPApiAuth.getEnvironment(); + environment = AuthenticationService.getEnvironment(); if (paps == null) { synchronized (papResourceLock) { - String urlList = XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_URLS); + String urlList = XACMLProperties.getProperty(XacmlRestProperties.PROP_PAP_URLS); if (urlList == null) { - urlList = XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_URL); + urlList = XACMLProperties.getProperty(XacmlRestProperties.PROP_PAP_URL); } paps = Arrays.asList(urlList.split(",")); } @@ -78,8 +78,8 @@ public class PAPServices { private String getPAPEncoding() { if (encoding == null) { - String userID = XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_USERID); - String pass = PeCryptoUtils.decrypt(XACMLProperties.getProperty(XACMLRestProperties.PROP_PAP_PASS)); + String userID = XACMLProperties.getProperty(XacmlRestProperties.PROP_PAP_USERID); + String pass = PeCryptoUtils.decrypt(XACMLProperties.getProperty(XacmlRestProperties.PROP_PAP_PASS)); Base64.Encoder encoder = Base64.getEncoder(); encoding = encoder.encodeToString((userID + ":" + pass).getBytes(StandardCharsets.UTF_8)); } @@ -331,6 +331,7 @@ public class PAPServices { private String checkResponse(final HttpURLConnection connection, final UUID requestID) throws IOException { String response = null; + LOGGER.info("PAPServices:checkResponse - RequestId: " + requestID + ", ResponseCode: " + responseCode); if (responseCode == 200 || isJunit) { // Check for successful creation of policy String isSuccess = null;