update sdc portal integration
Change-Id: I28e183508ba9a729221a60403850784953807209
Issue-ID: SDC-1749
Signed-off-by: Tal Gitelman <tg851x@intl.att.com>
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/EcompIntImpl.java b/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/EcompIntImpl.java
index 50d48d4..480d8eb 100644
--- a/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/EcompIntImpl.java
+++ b/catalog-be/src/main/java/org/openecomp/sdc/be/ecomp/EcompIntImpl.java
@@ -22,12 +22,9 @@
import fj.data.Either;
import org.onap.portalsdk.core.onboarding.crossapi.IPortalRestAPIService;
-import org.onap.portalsdk.core.onboarding.crossapi.IPortalRestCentralService;
import org.onap.portalsdk.core.onboarding.exception.CipherUtilException;
import org.onap.portalsdk.core.onboarding.exception.PortalAPIException;
import org.onap.portalsdk.core.onboarding.util.CipherUtil;
-import org.onap.portalsdk.core.onboarding.util.KeyConstants;
-import org.onap.portalsdk.core.onboarding.util.KeyProperties;
import org.onap.portalsdk.core.onboarding.util.PortalApiProperties;
import org.onap.portalsdk.core.restful.domain.EcompRole;
import org.onap.portalsdk.core.restful.domain.EcompUser;
@@ -46,7 +43,6 @@
import org.springframework.web.context.ContextLoader;
import javax.servlet.http.HttpServletRequest;
-import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -387,7 +383,7 @@
if (USERNAME != null && PASSWORD != null) {
try {
- if (CipherUtil.decryptPKC(USERNAME).equals(CipherUtil.decryptPKC(portal_user)) &&
+ if (USERNAME.equals(CipherUtil.decryptPKC(portal_user)) &&
CipherUtil.decryptPKC(PASSWORD).equals(CipherUtil.decryptPKC(portal_key))) {
log.debug("User authenticated - Username: {}", USERNAME);
return true;
@@ -397,7 +393,6 @@
return false;
}
}
-
log.debug("User authentication failed");
return false;
}