Search in sources :

Example 1 with NegatedServerWebExchangeMatcher

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

the class CookieServerRequestCache method createDefaultRequestMatcher.

private static ServerWebExchangeMatcher createDefaultRequestMatcher() {
    ServerWebExchangeMatcher get = ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET, "/**");
    ServerWebExchangeMatcher notFavicon = new NegatedServerWebExchangeMatcher(ServerWebExchangeMatchers.pathMatchers("/favicon.*"));
    MediaTypeServerWebExchangeMatcher html = new MediaTypeServerWebExchangeMatcher(MediaType.TEXT_HTML);
    html.setIgnoredMediaTypes(Collections.singleton(MediaType.ALL));
    return new AndServerWebExchangeMatcher(get, notFavicon, html);
}
Also used : NegatedServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.NegatedServerWebExchangeMatcher) MediaTypeServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.MediaTypeServerWebExchangeMatcher) ServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher) AndServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.AndServerWebExchangeMatcher) MediaTypeServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.MediaTypeServerWebExchangeMatcher) NegatedServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.NegatedServerWebExchangeMatcher) AndServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.AndServerWebExchangeMatcher)

Example 2 with NegatedServerWebExchangeMatcher

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

the class WebSessionServerRequestCache method createDefaultRequestMacher.

private static ServerWebExchangeMatcher createDefaultRequestMacher() {
    ServerWebExchangeMatcher get = ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET, "/**");
    ServerWebExchangeMatcher notFavicon = new NegatedServerWebExchangeMatcher(ServerWebExchangeMatchers.pathMatchers("/favicon.*"));
    MediaTypeServerWebExchangeMatcher html = new MediaTypeServerWebExchangeMatcher(MediaType.TEXT_HTML);
    html.setIgnoredMediaTypes(Collections.singleton(MediaType.ALL));
    return new AndServerWebExchangeMatcher(get, notFavicon, html);
}
Also used : NegatedServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.NegatedServerWebExchangeMatcher) MediaTypeServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.MediaTypeServerWebExchangeMatcher) ServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher) AndServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.AndServerWebExchangeMatcher) MediaTypeServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.MediaTypeServerWebExchangeMatcher) NegatedServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.NegatedServerWebExchangeMatcher) AndServerWebExchangeMatcher(org.springframework.security.web.server.util.matcher.AndServerWebExchangeMatcher)

Aggregations

AndServerWebExchangeMatcher (org.springframework.security.web.server.util.matcher.AndServerWebExchangeMatcher)2 MediaTypeServerWebExchangeMatcher (org.springframework.security.web.server.util.matcher.MediaTypeServerWebExchangeMatcher)2 NegatedServerWebExchangeMatcher (org.springframework.security.web.server.util.matcher.NegatedServerWebExchangeMatcher)2 ServerWebExchangeMatcher (org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher)2