当前位置: 首页>>代码示例>>Java>>正文


Java OrRequestMatcher类代码示例

本文整理汇总了Java中org.springframework.security.web.util.matcher.OrRequestMatcher的典型用法代码示例。如果您正苦于以下问题:Java OrRequestMatcher类的具体用法?Java OrRequestMatcher怎么用?Java OrRequestMatcher使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


OrRequestMatcher类属于org.springframework.security.web.util.matcher包,在下文中一共展示了OrRequestMatcher类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: OpenIdConnectFilter

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
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());
}
 
开发者ID:PacktPublishing,项目名称:OAuth-2.0-Cookbook,代码行数:10,代码来源:OpenIdConnectFilter.java

示例2: FacebookLoginFilter

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
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());
}
 
开发者ID:PacktPublishing,项目名称:OAuth-2.0-Cookbook,代码行数:11,代码来源:FacebookLoginFilter.java

示例3: SkipPathRequestMatcher

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
@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);
   }
 
开发者ID:mjfcolas,项目名称:infotaf,代码行数:8,代码来源:SkipPathRequestMatcher.java

示例4: SkipPathRequestMatcher

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
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);
}
 
开发者ID:osswangxining,项目名称:iotplatform,代码行数:8,代码来源:SkipPathRequestMatcher.java

示例5: CsrfCookieGeneratorFilter

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
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);
    }
}
 
开发者ID:suomenriistakeskus,项目名称:oma-riista-web,代码行数:10,代码来源:CsrfCookieGeneratorFilter.java

示例6: createDelegate

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
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));
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:11,代码来源:ManagementWebSecurityAutoConfiguration.java

示例7: createDelegate

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
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));
}
 
开发者ID:Nephilim84,项目名称:contestparser,代码行数:12,代码来源:ManagementWebSecurityAutoConfiguration.java

示例8: configure

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
@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();
}
 
开发者ID:hpe-idol,项目名称:find,代码行数:32,代码来源:InMemoryHodSecurity.java

示例9: IgnoredRequestMatcher

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
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);
}
 
开发者ID:Erudika,项目名称:para,代码行数:9,代码来源:IgnoredRequestMatcher.java

示例10: skipPathRequest

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
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);
}
 
开发者ID:bfwg,项目名称:angular-spring-starter,代码行数:7,代码来源:TokenAuthenticationFilter.java

示例11: skipPathRequest

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
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);
}
 
开发者ID:pandboy,项目名称:pingguopai,代码行数:7,代码来源:TokenAuthenticationFilter.java

示例12: SkipPathRequestMatcher

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
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);
}
 
开发者ID:Apereo-Learning-Analytics-Initiative,项目名称:OpenLRW,代码行数:7,代码来源:SkipPathRequestMatcher.java

示例13: getRequestMatcher

import org.springframework.security.web.util.matcher.OrRequestMatcher; //导入依赖的package包/类
/**
 * 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));
}
 
开发者ID:ulisesbocchio,项目名称:spring-boot-security-saml,代码行数:11,代码来源:ServiceProviderEndpoints.java


注:本文中的org.springframework.security.web.util.matcher.OrRequestMatcher类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。