Search in sources :

Example 1 with AnyRequestMatcher

use of org.springframework.security.web.util.matcher.AnyRequestMatcher in project spring-security by spring-projects.

the class FilterChainProxyConfigTests method mixingPatternsAndPlaceholdersDoesntCauseOrderingIssues.

// SEC-1235
@Test
public void mixingPatternsAndPlaceholdersDoesntCauseOrderingIssues() throws Exception {
    FilterChainProxy fcp = appCtx.getBean("sec1235FilterChainProxy", FilterChainProxy.class);
    List<SecurityFilterChain> chains = fcp.getFilterChains();
    assertThat(getPattern(chains.get(0))).isEqualTo("/login*");
    assertThat(getPattern(chains.get(1))).isEqualTo("/logout");
    assertThat(((DefaultSecurityFilterChain) chains.get(2)).getRequestMatcher() instanceof AnyRequestMatcher).isTrue();
}
Also used : DefaultSecurityFilterChain(org.springframework.security.web.DefaultSecurityFilterChain) SecurityFilterChain(org.springframework.security.web.SecurityFilterChain) FilterChainProxy(org.springframework.security.web.FilterChainProxy) AnyRequestMatcher(org.springframework.security.web.util.matcher.AnyRequestMatcher) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 DefaultSecurityFilterChain (org.springframework.security.web.DefaultSecurityFilterChain)1 FilterChainProxy (org.springframework.security.web.FilterChainProxy)1 SecurityFilterChain (org.springframework.security.web.SecurityFilterChain)1 AnyRequestMatcher (org.springframework.security.web.util.matcher.AnyRequestMatcher)1