webapp.interceptor-manager.WEB-INF.web.xml Maven / Gradle / Ivy
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <display-name>interceptor-manager</display-name> <listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener> <filter> <filter-name>DoAsFilter</filter-name> <filter-class>com.polarion.portal.tomcat.servlets.DoAsFilter</filter-class> </filter> <filter-mapping> <filter-name>DoAsFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <servlet> <servlet-name>interceptor-manager-rest</servlet-name> <servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class> <init-param> <param-name>javax.ws.rs.Application</param-name> <param-value>ch.sbb.polarion.extension.interceptor_manager.rest.InterceptorManagerRestApplication</param-value> </init-param> <init-param> <param-name>jersey.config.server.provider.classnames</param-name> <param-value>org.glassfish.jersey.media.multipart.MultiPartFeature</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <session-config> <session-timeout>30</session-timeout> </session-config> <mime-mapping> <extension>log</extension> <mime-type>text/plain</mime-type> </mime-mapping> <servlet-mapping> <servlet-name>interceptor-manager-rest</servlet-name> <url-pattern>/rest/*</url-pattern> </servlet-mapping> <security-constraint> <web-resource-collection> <web-resource-name>All</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>user</role-name> </auth-constraint> </security-constraint> <security-constraint> <web-resource-collection> <web-resource-name>All</web-resource-name> <url-pattern>/rest/api/*</url-pattern> </web-resource-collection> <auth-constraint/> </security-constraint> <!-- Login configuration uses form-based authentication --> <login-config> <auth-method>FORM</auth-method> <realm-name>PolarionRealm</realm-name> <form-login-config> <form-login-page>/login/login</form-login-page> <form-error-page>/login/error</form-error-page> </form-login-config> </login-config> </web-app>