Search in sources :

Example 6 with DelegatingFilterProxy

use of org.springframework.web.filter.DelegatingFilterProxy in project spring-security-oauth by spring-projects.

the class ServletInitializer method registerProxyFilter.

private void registerProxyFilter(ServletContext servletContext, String name) {
    DelegatingFilterProxy filter = new DelegatingFilterProxy(name);
    filter.setContextAttribute("org.springframework.web.servlet.FrameworkServlet.CONTEXT.dispatcher");
    servletContext.addFilter(name, filter).addMappingForUrlPatterns(null, false, "/*");
}
Also used : DelegatingFilterProxy(org.springframework.web.filter.DelegatingFilterProxy)

Example 7 with DelegatingFilterProxy

use of org.springframework.web.filter.DelegatingFilterProxy in project spring-security-oauth by spring-projects.

the class ServletInitializer method onStartup.

@Override
public void onStartup(ServletContext servletContext) throws ServletException {
    super.onStartup(servletContext);
    DelegatingFilterProxy filter = new DelegatingFilterProxy("springSecurityFilterChain");
    filter.setContextAttribute("org.springframework.web.servlet.FrameworkServlet.CONTEXT.dispatcher");
    servletContext.addFilter("springSecurityFilterChain", filter).addMappingForUrlPatterns(null, false, "/*");
}
Also used : DelegatingFilterProxy(org.springframework.web.filter.DelegatingFilterProxy)

Aggregations

DelegatingFilterProxy (org.springframework.web.filter.DelegatingFilterProxy)7 FilterRegistration (javax.servlet.FilterRegistration)3 BackupService (com.thoughtworks.go.server.service.BackupService)1 Before (org.junit.Before)1 WebApplicationContext (org.springframework.web.context.WebApplicationContext)1