Java Code Examples for

The following examples show how to use These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: youkefu   Source File:    License: Apache License 2.0 6 votes vote down vote up
public Filter tokenInfoTokenFilterSecurityInterceptor() throws Exception
    RequestMatcher autconfig = new RegexRequestMatcher("/autoconfig([\\S\\s]*?)",null);
    RequestMatcher configprops = new RegexRequestMatcher("/configprops([\\S\\s]*?)",null);
    RequestMatcher beans = new RegexRequestMatcher("/beans([\\S\\s]*?)",null);
    RequestMatcher dump = new RegexRequestMatcher("/dump([\\S\\s]*?)",null);
    RequestMatcher env = new RegexRequestMatcher("/env([\\S\\s]*?)",null);
    RequestMatcher health = new RegexRequestMatcher("/health([\\S\\s]*?)",null);
    RequestMatcher info = new RegexRequestMatcher("/info([\\S\\s]*?)",null);
    RequestMatcher mappings = new RegexRequestMatcher("/mappings([\\S\\s]*?)",null);
    RequestMatcher metrics = new RegexRequestMatcher("/metrics([\\S\\s]*?)",null);
    RequestMatcher trace = new RegexRequestMatcher("/trace([\\S\\s]*?)",null);
    RequestMatcher druid = new RegexRequestMatcher("/druid([\\S\\s]*?)",null);
    RequestMatcher admin = new RegexRequestMatcher("/admin([\\S\\s]*?)",null);
    return new DelegateRequestMatchingFilter(autconfig , configprops , beans , dump , env , health , info , mappings , metrics , trace, druid , admin);
Example 2
public CsrfSecurityRequestMatcher() {
    this.whiteListedMatchers = Arrays.asList(
        new RegexRequestMatcher("/rest/.*\\.view(\\?.*)?", "POST"),
        new RegexRequestMatcher("/search(?:\\.view)?", "POST"),
        // websockets are protected by stomp headers
        new AntPathRequestMatcher("/websocket/**")
Example 3
public CsrfSecurityRequestMatcher() {
    this.whiteListedMatchers = Arrays.asList(
        new RegexRequestMatcher("/dwr/.*\\.dwr", "POST"),
        new RegexRequestMatcher("/rest/.*\\.view(\\?.*)?", "POST"),
        new RegexRequestMatcher("/search(?:\\.view)?", "POST")
Example 4
Source Project: studio   Source File:    License: GNU General Public License v3.0 5 votes vote down vote up
public OrRegexRequestMatcher(String... patterns) {
    requestMatcher = new OrRequestMatcher(
                    .map(pattern -> new RegexRequestMatcher(pattern, null))