Java 类org.springframework.security.web.util.matcher.OrRequestMatcher 实例源码

项目:OAuth-2.0-Cookbook    文件:FacebookLoginFilter.java   
public FacebookLoginFilter(
    @Value("${facebook.filter.callback-uri}") String callbackUri,
    @Value("${facebook.filter.api-base-uri}")String apiBaseUri) {
    super(new OrRequestMatcher(
        new AntPathRequestMatcher(callbackUri),
        new AntPathRequestMatcher(apiBaseUri)
    ));
    this.localMatcher = new AntPathRequestMatcher(apiBaseUri);
    setAuthenticationManager(new NoopAuthenticationManager());
}
项目:OAuth-2.0-Cookbook    文件:OpenIdConnectFilter.java   
public OpenIdConnectFilter(
    @Value("${openid.callback-uri}") String callbackUri,
    @Value("${openid.api-base-uri}") String apiBaseUri) {
    super(new OrRequestMatcher(
        new AntPathRequestMatcher(callbackUri),
        new AntPathRequestMatcher(apiBaseUri)));
    this.localMatcher = new AntPathRequestMatcher(apiBaseUri);
    setAuthenticationManager(new NoopAuthenticationManager());
}
项目:OAuth-2.0-Cookbook    文件:OpenIdConnectFilter.java   
public OpenIdConnectFilter(
    @Value("${openid.callback-uri}") String callbackUri,
    @Value("${openid.api-base-uri}") String apiBaseUri) {
    super(new OrRequestMatcher(
        new AntPathRequestMatcher(callbackUri),
        new AntPathRequestMatcher(apiBaseUri)));
    this.localMatcher = new AntPathRequestMatcher(apiBaseUri);
    setAuthenticationManager(new NoopAuthenticationManager());
}
项目:pingguopai    文件:TokenAuthenticationFilter.java   
private boolean skipPathRequest(HttpServletRequest request, List<String> pathsToSkip ) {
    Assert.notNull(pathsToSkip, "pathsToSkip is null!");
    List<RequestMatcher> m = pathsToSkip.stream().map(path -> new AntPathRequestMatcher(path)).collect(Collectors.toList());
    OrRequestMatcher matchers = new OrRequestMatcher(m);
    return matchers.matches(request);
}
项目:infotaf    文件:SkipPathRequestMatcher.java   
@SuppressWarnings("deprecation")
public SkipPathRequestMatcher(List<String> pathsToSkip, String processingPath) {
       Assert.notNull(pathsToSkip);
       List<RequestMatcher> m = pathsToSkip.stream().map(path -> new AntPathRequestMatcher(path)).collect(Collectors.toList());
       matchers = new OrRequestMatcher(m);
       processingMatcher = new AntPathRequestMatcher(processingPath);
   }
项目:iotplatform    文件:SkipPathRequestMatcher.java   
public SkipPathRequestMatcher(List<String> pathsToSkip, String processingPath) {
  Assert.notNull(pathsToSkip);
  List<RequestMatcher> m = pathsToSkip.stream().map(path -> new AntPathRequestMatcher(path))
      .collect(Collectors.toList());
  matchers = new OrRequestMatcher(m);
  processingMatcher = new AntPathRequestMatcher(processingPath);
}
项目:oma-riista-web    文件:CsrfCookieGeneratorFilter.java   
public CsrfCookieGeneratorFilter(final String... ignoredPatterns) {
    if (ignoredPatterns.length > 0) {
        this.ignoredMatcher = new OrRequestMatcher(Arrays.stream(ignoredPatterns)
                .map(AntPathRequestMatcher::new)
                .collect(toList()));
    } else {
        this.ignoredMatcher = new NegatedRequestMatcher(AnyRequestMatcher.INSTANCE);
    }
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:ManagementWebSecurityAutoConfiguration.java   
private RequestMatcher createDelegate() {
    ServerProperties server = this.contextResolver.getApplicationContext()
            .getBean(ServerProperties.class);
    List<RequestMatcher> matchers = new ArrayList<RequestMatcher>();
    EndpointHandlerMapping endpointHandlerMapping = getRequiredEndpointHandlerMapping();
    for (String path : this.endpointPaths.getPaths(endpointHandlerMapping)) {
        matchers.add(new AntPathRequestMatcher(server.getPath(path)));
    }
    return (matchers.isEmpty() ? MATCH_NONE : new OrRequestMatcher(matchers));
}
项目:spring-boot-concourse    文件:ManagementWebSecurityAutoConfiguration.java   
private RequestMatcher createDelegate() {
    ServerProperties server = this.contextResolver.getApplicationContext()
            .getBean(ServerProperties.class);
    List<RequestMatcher> matchers = new ArrayList<RequestMatcher>();
    EndpointHandlerMapping endpointHandlerMapping = getRequiredEndpointHandlerMapping();
    for (String path : this.endpointPaths.getPaths(endpointHandlerMapping)) {
        matchers.add(new AntPathRequestMatcher(server.getPath(path)));
    }
    return (matchers.isEmpty() ? MATCH_NONE : new OrRequestMatcher(matchers));
}
项目:contestparser    文件:ManagementWebSecurityAutoConfiguration.java   
private RequestMatcher createDelegate() {
    ServerProperties server = ManagementWebSecurityConfigurerAdapter.this.server;
    List<RequestMatcher> matchers = new ArrayList<RequestMatcher>();
    EndpointHandlerMapping endpointHandlerMapping = ManagementWebSecurityConfigurerAdapter.this
            .getRequiredEndpointHandlerMapping();
    for (String path : this.endpointPaths.getPaths(endpointHandlerMapping)) {
        matchers.add(new AntPathRequestMatcher(server.getPath(path)));
    }
    return (matchers.isEmpty() ? AnyRequestMatcher.INSTANCE
            : new OrRequestMatcher(matchers));
}
项目:find    文件:InMemoryHodSecurity.java   
@SuppressWarnings("ProhibitedExceptionDeclared")
@Override
protected void configure(final HttpSecurity http) throws Exception {
    final AuthenticationSuccessHandler loginSuccessHandler = new LoginSuccessHandler(FindRole.CONFIG.toString(), FindController.CONFIG_PATH, "/p/");
    final HttpSessionRequestCache requestCache = new HttpSessionRequestCache();

    requestCache.setRequestMatcher(new OrRequestMatcher(
            new AntPathRequestMatcher("/p/**"),
            new AntPathRequestMatcher(FindController.CONFIG_PATH)
    ));

    http.regexMatcher("/p/.*|/config/.*|/authenticate|/logout")
        .authorizeRequests()
            .antMatchers("/p/**").hasRole(FindRole.ADMIN.name())
            .antMatchers(FindController.CONFIG_PATH).hasRole(FindRole.CONFIG.name())
            .and()
        .requestCache()
            .requestCache(requestCache)
            .and()
        .formLogin()
            .loginPage(FindController.DEFAULT_LOGIN_PAGE)
            .loginProcessingUrl("/authenticate")
            .successHandler(loginSuccessHandler)
            .failureUrl(FindController.DEFAULT_LOGIN_PAGE + "?error=auth")
            .and()
        .logout()
            .logoutSuccessHandler(new HodLogoutSuccessHandler(new HodTokenLogoutSuccessHandler(SsoController.SSO_LOGOUT_PAGE, tokenRepository), FindController.APP_PATH))
            .and()
        .csrf()
            .disable();
}
项目:para    文件:IgnoredRequestMatcher.java   
private IgnoredRequestMatcher() {
    ConfigList c = Config.getConfig().getList("security.ignored");
    List<RequestMatcher> list = new ArrayList<>(c.size());
    for (ConfigValue configValue : c) {
        list.add(new AntPathRequestMatcher((String) configValue.unwrapped()));
    }
    orMatcher = new OrRequestMatcher(list);
}
项目:angular-spring-starter    文件:TokenAuthenticationFilter.java   
private boolean skipPathRequest(HttpServletRequest request, List<String> pathsToSkip ) {
    Assert.notNull(pathsToSkip, "path cannot be null.");
    List<RequestMatcher> m = pathsToSkip.stream().map(path -> new AntPathRequestMatcher(path)).collect(Collectors.toList());
    OrRequestMatcher matchers = new OrRequestMatcher(m);
    return matchers.matches(request);
}
项目:OpenLRW    文件:SkipPathRequestMatcher.java   
public SkipPathRequestMatcher(List<String> pathsToSkip, String processingPath) {
    Assert.notNull(pathsToSkip);
    List<RequestMatcher> m = pathsToSkip.stream().map(path -> new AntPathRequestMatcher(path)).collect(Collectors.toList());
    matchers = new OrRequestMatcher(m);
    processingMatcher = new AntPathRequestMatcher(processingPath);
}
项目:thingsboard    文件:SkipPathRequestMatcher.java   
public SkipPathRequestMatcher(List<String> pathsToSkip, String processingPath) {
    Assert.notNull(pathsToSkip);
    List<RequestMatcher> m = pathsToSkip.stream().map(path -> new AntPathRequestMatcher(path)).collect(Collectors.toList());
    matchers = new OrRequestMatcher(m);
    processingMatcher = new AntPathRequestMatcher(processingPath);
}
项目:spring-boot-security-saml    文件:ServiceProviderEndpoints.java   
/**
 * Returns an {@link OrRequestMatcher} that contains all the different URLs configured throughout the Service
 * Provider configuration.
 *
 * @return
 */
public RequestMatcher getRequestMatcher() {
    return new OrRequestMatcher(requestMatchers(defaultFailureURL, ssoProcessingURL, ssoHoKProcessingURL, discoveryProcessingURL,
            idpSelectionPageURL, ssoLoginURL, metadataURL, defaultTargetURL, logoutURL, singleLogoutURL));
}