Example usage for org.springframework.security.web.util.matcher OrRequestMatcher OrRequestMatcher

List of usage examples for org.springframework.security.web.util.matcher OrRequestMatcher OrRequestMatcher

Introduction

In this page you can find the example usage for org.springframework.security.web.util.matcher OrRequestMatcher OrRequestMatcher.

Prototype

public OrRequestMatcher(RequestMatcher... requestMatchers) 

Source Link

Document

Creates a new instance

Usage

From source file:com.erudika.para.security.IgnoredRequestMatcher.java

private IgnoredRequestMatcher() {
    ConfigList c = Config.getConfig().getList("security.ignored");
    List<RequestMatcher> list = new ArrayList<RequestMatcher>(c.size());
    for (ConfigValue configValue : c) {
        list.add(new AntPathRequestMatcher((String) configValue.unwrapped()));
    }/*from  w  w w .j  a  va2 s  .co m*/
    orMatcher = new OrRequestMatcher(list);
}

From source file:sample.session.SmartHttpSessionStrategy.java

@Autowired
public SmartHttpSessionStrategy(ContentNegotiationStrategy contentNegotiationStrategy) {
    this(new CookieHttpSessionStrategy(), new HeaderHttpSessionStrategy());
    MediaTypeRequestMatcher matcher = new MediaTypeRequestMatcher(contentNegotiationStrategy,
            Arrays.asList(MediaType.TEXT_HTML));
    matcher.setIgnoredMediaTypes(Collections.singleton(MediaType.ALL));

    RequestHeaderRequestMatcher javascript = new RequestHeaderRequestMatcher("X-Requested-With");

    this.browserMatcher = new OrRequestMatcher(Arrays.asList(matcher, javascript));
}