diff options
author | renealr <reneal.rogers@amdocs.com> | 2018-11-29 14:03:36 -0500 |
---|---|---|
committer | renealr <reneal.rogers@amdocs.com> | 2018-11-29 15:53:48 -0500 |
commit | c77d4200369b9514d9731cbdcaa987943a36346d (patch) | |
tree | 94f0d1c262752f1d771dd0ec07f7ce07694def2f /sparkybe-onap-application/src/main/java | |
parent | 5e4b48acc875f88e2958b4469cb889222ca2f11c (diff) |
update to use latest portal sdk
update epsdk-fw to latest version to make use of aaf
Issue-ID: AAI-1978
Change-Id: I9cd9a4ec57db5183c95b0606cac0e1fdfd1a6ac5
Signed-off-by: renealr <reneal.rogers@amdocs.com>
Diffstat (limited to 'sparkybe-onap-application/src/main/java')
-rw-r--r-- | sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java index 86f019e..4443443 100644 --- a/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java +++ b/sparkybe-onap-application/src/main/java/org/onap/aai/sparky/portal/PortalBean.java @@ -3,7 +3,8 @@ package org.onap.aai.sparky.portal; import javax.servlet.Filter; import org.onap.aai.sparky.security.filter.LoginFilter; -import org.openecomp.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy; +import org.onap.portalsdk.core.onboarding.crossapi.CadiAuthFilter; +import org.onap.portalsdk.core.onboarding.crossapi.PortalRestAPIProxy; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.context.annotation.Bean; @@ -13,27 +14,45 @@ import org.springframework.stereotype.Component; @Component @Profile("portal") public class PortalBean { - + private Filter loginFilter = new LoginFilter(); - + private Filter cadiAuthFilter = new CadiAuthFilter(); + /** * bind LoginFilter */ @Bean public FilterRegistrationBean loginFilterRegistrationBean() { FilterRegistrationBean registration = new FilterRegistrationBean(); - registration.setFilter(loginFilter); registration.addUrlPatterns("/*"); - + registration.setOrder(1); + return registration; } + /** + * bind CadiAuthFilter + */ + @Bean + public FilterRegistrationBean cadiFilterRegistrationBean() { + FilterRegistrationBean registration = new FilterRegistrationBean(); + + registration.setFilter(cadiAuthFilter); + registration.addUrlPatterns("/*"); + registration.setOrder(0); + registration.addInitParameter("cadi_prop_files","/opt/app/sparky/resources/portal/cadi.properties"); + registration.addInitParameter("inlclude_url_endpoints","/api/v3/*"); + registration.addInitParameter("exclude_url_endpoints","/api/v2/*"); + + return registration; + } + @Bean public ServletRegistrationBean portalApiProxy() { - + final ServletRegistrationBean servlet = - new ServletRegistrationBean(new PortalRestAPIProxy(), "/api/v2/*"); + new ServletRegistrationBean(new PortalRestAPIProxy(), "/api/v3/*"); servlet.setName("PortalRestApiProxy"); return servlet; } |