X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=webapp-backend%2Fsrc%2Fmain%2Fjava%2Forg%2Foransc%2Fric%2Fportal%2Fdashboard%2Fportalapi%2FPortalAuthManager.java;h=2cf55a8780218dd7cc00289082d749573975e26c;hb=e020df304f6faa1d90f64ddea14407aec1c15dcb;hp=8eb7362b4a18c18bc5709b236a39d02ced8748f2;hpb=44203c43bb16a87eb54cc97431a026e111842c97;p=portal%2Fric-dashboard.git diff --git a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthManager.java b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthManager.java index 8eb7362b..2cf55a87 100644 --- a/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthManager.java +++ b/webapp-backend/src/main/java/org/oransc/ric/portal/dashboard/portalapi/PortalAuthManager.java @@ -27,6 +27,7 @@ import java.util.Map; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; +import org.onap.portalsdk.core.onboarding.crossapi.IPortalRestCentralService; import org.onap.portalsdk.core.onboarding.exception.CipherUtilException; import org.onap.portalsdk.core.onboarding.util.PortalApiConstants; import org.slf4j.Logger; @@ -44,14 +45,12 @@ public class PortalAuthManager { private final String userIdCookieName; public PortalAuthManager(final String appName, final String username, final String password, - final String decryptorClassName, final String userCookie) - throws ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, - InvocationTargetException, NoSuchMethodException, SecurityException { + final String decryptorClassName, final String userCookie) throws ClassNotFoundException, + InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException { credentialsMap = new HashMap<>(); - // The map keys are hardcoded in EPSDK-FW, no constants are defined :( - credentialsMap.put("appName", appName); - credentialsMap.put("username", username); - credentialsMap.put("password", password); + credentialsMap.put(IPortalRestCentralService.CREDENTIALS_APP, appName); + credentialsMap.put(IPortalRestCentralService.CREDENTIALS_USER, username); + credentialsMap.put(IPortalRestCentralService.CREDENTIALS_PASS, password); this.userIdCookieName = userCookie; // Instantiate here so configuration errors are detected at app-start time logger.debug("ctor: using decryptor class {}", decryptorClassName);