From 63b46af08c9605e3b8c44099074d626a53bf720f Mon Sep 17 00:00:00 2001 From: Ryan Goulding Date: Mon, 28 Dec 2015 12:37:41 -0500 Subject: [PATCH] Bug 4846 odl-mdsal-apidocs swagger UI uses deprecated TokenAuthFilter Switches from TokenAuthFilter, a ContainerRequestFilter, to AAAFilter, a javax.servlet.Filter. This allows use of Shiro Realms including LDAP. Change-Id: I4956d773da4128b5bbae92b3438154eff3e76367 Signed-off-by: Ryan Goulding --- opendaylight/restconf/sal-rest-docgen/pom.xml | 7 +++++- .../src/main/resources/WEB-INF/web.xml | 24 +++++++++++++++---- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/opendaylight/restconf/sal-rest-docgen/pom.xml b/opendaylight/restconf/sal-rest-docgen/pom.xml index 2a14fe28aa..30f78ea494 100644 --- a/opendaylight/restconf/sal-rest-docgen/pom.xml +++ b/opendaylight/restconf/sal-rest-docgen/pom.xml @@ -106,7 +106,12 @@ !org.apache.maven.project, !org.opendaylight.yangtools.yang2sources.spi, *, - com.sun.jersey.spi.container.servlet, org.eclipse.jetty.servlets + com.sun.jersey.spi.container.servlet, + org.eclipse.jetty.servlets, + org.opendaylight.aaa.shiro.filters, + org.opendaylight.aaa.shiro.realm, + org.opendaylight.aaa.shiro.web.env, + org.apache.shiro.web.env org.opendaylight.netconf.sal.rest.doc.DocProvider /apidoc diff --git a/opendaylight/restconf/sal-rest-docgen/src/main/resources/WEB-INF/web.xml b/opendaylight/restconf/sal-rest-docgen/src/main/resources/WEB-INF/web.xml index 930a39db8e..cd26769630 100644 --- a/opendaylight/restconf/sal-rest-docgen/src/main/resources/WEB-INF/web.xml +++ b/opendaylight/restconf/sal-rest-docgen/src/main/resources/WEB-INF/web.xml @@ -12,14 +12,28 @@ javax.ws.rs.Application org.opendaylight.netconf.sal.rest.doc.jaxrs.ApiDocApplication - - - com.sun.jersey.spi.container.ContainerRequestFilters - org.opendaylight.aaa.sts.TokenAuthFilter - 1 + + shiroEnvironmentClass + org.opendaylight.aaa.shiro.web.env.KarafIniWebEnvironment + + + + org.apache.shiro.web.env.EnvironmentLoaderListener + + + + ShiroFilter + org.opendaylight.aaa.shiro.filters.AAAFilter + + + + ShiroFilter + /* + + JAXRSApiDoc /apis/* -- 2.36.6