From 37198055321d65aff51d06716461050752cea9a5 Mon Sep 17 00:00:00 2001 From: Sneha Dantkale Date: Fri, 21 Feb 2020 19:51:11 +0530 Subject: [PATCH] [AAI-2787] | Update AAI UI with portal sdk 2.6.0 Issue-ID: AAI-2787 Signed-off-by: Sneha Dantkale Change-Id: Ie8346f51fd5921c9935561c27e16598d70999455 --- pom.xml | 11 +++++++++++ sparkybe-onap-application/pom.xml | 1 - sparkybe-onap-service/pom.xml | 1 - .../security/portal/PortalRestAPICentralServiceImpl.java | 9 +++++++-- .../aai/sparky/security/portal/PortalRestAPIServiceImpl.java | 7 ++++++- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index b0d09b0..923fd36 100644 --- a/pom.xml +++ b/pom.xml @@ -23,6 +23,7 @@ /content/sites/site/org/onap/aai/sparky-be/${project.artifactId}/${project.version} https://nexus.onap.org + 2.6.0 @@ -39,6 +40,16 @@ + + + + org.onap.portal.sdk + epsdk-fw + ${portal.sdk.version} + + + + diff --git a/sparkybe-onap-application/pom.xml b/sparkybe-onap-application/pom.xml index bdb37a7..55da4f2 100644 --- a/sparkybe-onap-application/pom.xml +++ b/sparkybe-onap-application/pom.xml @@ -292,7 +292,6 @@ org.onap.portal.sdk epsdk-fw - 2.5.0 commons-logging diff --git a/sparkybe-onap-service/pom.xml b/sparkybe-onap-service/pom.xml index 47cba7c..842af2d 100644 --- a/sparkybe-onap-service/pom.xml +++ b/sparkybe-onap-service/pom.xml @@ -293,7 +293,6 @@ some of the depedencies should probably have a scope of provided so they don't a org.onap.portal.sdk epsdk-fw - 2.5.0 commons-logging diff --git a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPICentralServiceImpl.java b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPICentralServiceImpl.java index 922597d..90c5fe9 100644 --- a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPICentralServiceImpl.java +++ b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPICentralServiceImpl.java @@ -233,13 +233,18 @@ public class PortalRestAPICentralServiceImpl } - @Override + @Deprecated public boolean isAppAuthenticated(HttpServletRequest request) throws PortalAPIException { + return isAppAuthenticated(request,null); + } + + @Override + public boolean isAppAuthenticated(HttpServletRequest request,Map paramMap) throws PortalAPIException { LOG.debug("Authentication request"); String nameSpace = PortalApiProperties.getProperty(PortalApiConstants.AUTH_NAMESPACE); boolean accessAllowed = false; try { - accessAllowed = AuthUtil.isAccessAllowed(request, nameSpace); + accessAllowed = AuthUtil.isAccessAllowed(request, nameSpace,getCredentials()); } catch (Exception e) { String response = "PortalRestAPICentralServiceImpl.isAppAuthenticated failed"; LOG.error(response, e); diff --git a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPIServiceImpl.java b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPIServiceImpl.java index 0835b7b..7a71fbc 100644 --- a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPIServiceImpl.java +++ b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPIServiceImpl.java @@ -187,8 +187,13 @@ public class PortalRestAPIServiceImpl implements IPortalRestAPIService { * (non-Javadoc) * */ - @Override + @Deprecated public boolean isAppAuthenticated(HttpServletRequest request) throws PortalAPIException { + return isAppAuthenticated(request,null); + } + + @Override + public boolean isAppAuthenticated(HttpServletRequest request,Map paramMap) throws PortalAPIException { LOG.debug("Authentication request"); PortalAuthenticationConfig config = PortalAuthenticationConfig.getInstance(); String restUsername = request.getHeader(PortalAuthenticationConfig.PROP_USERNAME); -- 2.16.6