[AAI-2787] | Update AAI UI with portal sdk 2.6.0 51/102151/2
authorSneha Dantkale <Sneha.dantkale@amdocs.com>
Fri, 21 Feb 2020 14:21:11 +0000 (19:51 +0530)
committerSneha Dantkale <sneha.dantkale@amdocs.com>
Fri, 21 Feb 2020 14:32:16 +0000 (14:32 +0000)
Issue-ID: AAI-2787

Signed-off-by: Sneha Dantkale <Sneha.dantkale@amdocs.com>
Change-Id: Ie8346f51fd5921c9935561c27e16598d70999455

pom.xml
sparkybe-onap-application/pom.xml
sparkybe-onap-service/pom.xml
sparkybe-onap-service/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPICentralServiceImpl.java
sparkybe-onap-service/src/main/java/org/onap/aai/sparky/security/portal/PortalRestAPIServiceImpl.java

diff --git a/pom.xml b/pom.xml
index b0d09b0..923fd36 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -23,6 +23,7 @@
     <properties>
         <sitePath>/content/sites/site/org/onap/aai/sparky-be/${project.artifactId}/${project.version}</sitePath>
         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+        <portal.sdk.version>2.6.0</portal.sdk.version>
 
        <sonar.jacoco.reportPath />
        <sonar.jacoco.itReportPath />
 
     </properties>
 
+       <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.onap.portal.sdk</groupId>
+                <artifactId>epsdk-fw</artifactId>
+                <version>${portal.sdk.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
     <!-- we don't need to deploy the top level pom project -->
        <build>
          <pluginManagement>
index bdb37a7..55da4f2 100644 (file)
         <dependency>
             <groupId>org.onap.portal.sdk</groupId>
             <artifactId>epsdk-fw</artifactId>
-            <version>2.5.0</version>
             <exclusions>
                 <exclusion>
                     <groupId>commons-logging</groupId>
index 47cba7c..842af2d 100644 (file)
@@ -293,7 +293,6 @@ some of the depedencies should probably have a scope of provided so they don't a
                <dependency>
                        <groupId>org.onap.portal.sdk</groupId>
                        <artifactId>epsdk-fw</artifactId>
-                       <version>2.5.0</version>
                        <exclusions>
                                <exclusion>
                                        <groupId>commons-logging</groupId>
index 922597d..90c5fe9 100644 (file)
@@ -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<String, String> 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);
index 0835b7b..7a71fbc 100644 (file)
@@ -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<String, String> paramMap) throws PortalAPIException {
     LOG.debug("Authentication request");
     PortalAuthenticationConfig config = PortalAuthenticationConfig.getInstance();
     String restUsername = request.getHeader(PortalAuthenticationConfig.PROP_USERNAME);