use of org.springframework.web.filter.DelegatingFilterProxy in project spring-security by spring-projects.
the class AbstractSecurityWebApplicationInitializer method insertSpringSecurityFilterChain.
/**
* Registers the springSecurityFilterChain
* @param servletContext the {@link ServletContext}
*/
private void insertSpringSecurityFilterChain(ServletContext servletContext) {
String filterName = DEFAULT_FILTER_NAME;
DelegatingFilterProxy springSecurityFilterChain = new DelegatingFilterProxy(filterName);
String contextAttribute = getWebApplicationContextAttribute();
if (contextAttribute != null) {
springSecurityFilterChain.setContextAttribute(contextAttribute);
}
registerFilter(servletContext, true, filterName, springSecurityFilterChain);
}
use of org.springframework.web.filter.DelegatingFilterProxy in project gocd by gocd.
the class ApiSessionFilterIntegrationTest method setUp.
@Before
public void setUp() throws Exception {
WebApplicationContext wac = mock(WebApplicationContext.class);
when(wac.getBean("filterChainProxy", javax.servlet.Filter.class)).thenReturn(filterChainProxy);
when(wac.getBean("backupService")).thenReturn(mock(BackupService.class));
filterChainProxy.init(new MockFilterConfig());
servletContext = new MockServletContext();
servletContext.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, wac);
proxy = new DelegatingFilterProxy("filterChainProxy", wac);
proxy.setServletContext(servletContext);
}
use of org.springframework.web.filter.DelegatingFilterProxy in project Activiti by Activiti.
the class WebConfigurer method initSpringSecurity.
/**
* Initializes Spring Security.
*/
private void initSpringSecurity(ServletContext servletContext, EnumSet<DispatcherType> disps) {
log.debug("Registering Spring Security Filter");
FilterRegistration.Dynamic springSecurityFilter = servletContext.addFilter("springSecurityFilterChain", new DelegatingFilterProxy());
springSecurityFilter.addMappingForUrlPatterns(disps, false, "/*");
springSecurityFilter.setAsyncSupported(true);
}
use of org.springframework.web.filter.DelegatingFilterProxy in project Activiti by Activiti.
the class JPAWebConfigurer method initSpringSecurity.
/**
* Initializes Spring Security.
*/
private void initSpringSecurity(ServletContext servletContext, EnumSet<DispatcherType> disps) {
log.debug("Registering Spring Security Filter");
FilterRegistration.Dynamic springSecurityFilter = servletContext.addFilter("springSecurityFilterChain", new DelegatingFilterProxy());
springSecurityFilter.addMappingForUrlPatterns(disps, false, "/*");
}
use of org.springframework.web.filter.DelegatingFilterProxy in project Activiti by Activiti.
the class WebConfigurer method initSpringSecurity.
/**
* Initializes Spring Security.
*/
private void initSpringSecurity(ServletContext servletContext, EnumSet<DispatcherType> disps) {
log.debug("Registering Spring Security Filter");
FilterRegistration.Dynamic springSecurityFilter = servletContext.addFilter("springSecurityFilterChain", new DelegatingFilterProxy());
springSecurityFilter.addMappingForUrlPatterns(disps, false, "/*");
}
Aggregations