package org.onap.policy.admin;
-
import com.att.research.xacml.util.XACMLProperties;
+
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.Properties;
+
import org.onap.policy.common.logging.flexlogger.FlexLogger;
import org.onap.policy.common.logging.flexlogger.Logger;
import org.onap.policy.rest.XACMLRestProperties;
private static final Logger LOGGER = FlexLogger.getLogger(CheckPDP.class);
private CheckPDP() {
- //default constructor
+ // default constructor
}
public static Map<String, String> getPdpMap() {
} else if (pdpPath == null) {
pdpPath = Paths.get(pdpFile);
if (!pdpPath.toString().endsWith(".properties") || !pdpPath.toFile().exists()) {
- LOGGER.error(
- XACMLErrorConstants.ERROR_SYSTEM_ERROR + "File doesn't exist in the specified Path : " + pdpPath
- .toString());
+ LOGGER.error(XACMLErrorConstants.ERROR_SYSTEM_ERROR + "File doesn't exist in the specified Path : "
+ + pdpPath.toString());
CheckPDP.reset();
return;
}
Base64.Encoder encoder = Base64.getEncoder();
// 0 - PDPURL
pdpMap.put(pdpValues.get(0),
- encoder.encodeToString((userID + ":" + pass).getBytes(StandardCharsets.UTF_8)));
+ encoder.encodeToString((userID + ":" + pass).getBytes(StandardCharsets.UTF_8)));
} else {
LOGGER.error(XACMLErrorConstants.ERROR_PERMISSIONS + "No Credentials to send Request: " + pdpValues);
}