* ========================LICENSE_START=================================
* O-RAN-SC
* %%
- * Copyright (C) 2019 AT&T Intellectual Property and Nokia
+ * Copyright (C) 2019 AT&T Intellectual Property
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
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;
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);
* password.
*/
public Map<String, String> getAppCredentials() {
+ logger.debug("getAppCredentials");
return credentialsMap;
}
* established a user ID; else null.
*/
public String validateEcompSso(HttpServletRequest request) {
+ logger.debug("validateEcompSso URI {}", request.getRequestURI());
// Check ECOMP Portal cookie
Cookie ep = getCookie(request, PortalApiConstants.EP_SERVICE);
if (ep == null) {