Java 类org.springframework.security.web.server.SecurityWebFilterChain 实例源码

项目:spring-boot-admin    文件:SpringBootAdminApplication.java   
@Bean
@Profile("secure")
public SecurityWebFilterChain securityWebFilterChainSecure(ServerHttpSecurity http) {
    // @formatter:off
    return http.authorizeExchange()
            .pathMatchers(adminContextPath + "/assets/**").permitAll()
            .pathMatchers(adminContextPath + "/login").permitAll()
            .anyExchange().authenticated()
            .and()
        .formLogin().loginPage(adminContextPath + "/login").and()
        .logout().logoutUrl(adminContextPath + "/logout").and()
        .httpBasic().and()
        .csrf().disable()
        .build();
    // @formatter:on
}
项目:spring-webflux-microservices-boilerplate    文件:SecurityConfig.java   
@Bean
  public SecurityWebFilterChain springWebFilterChain(HttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
          .anyExchange().permitAll()
//          .anyExchange().authenticated()
          .and()
        .build();
  }
项目:Learning-Spring-Boot-2.0-Second-Edition    文件:SecurityConfiguration.java   
@Bean
SecurityWebFilterChain springWebFilterChain() {
    return HttpSecurity.http()
        .securityContextRepository(
            new WebSessionSecurityContextRepository())
        .authorizeExchange()
            .anyExchange().authenticated()
            .and()
        .build();
}
项目:Learning-Spring-Boot-2.0-Second-Edition    文件:SecurityConfiguration.java   
@Bean
SecurityWebFilterChain springWebFilterChain() {
    return HttpSecurity.http()
        .securityContextRepository(new WebSessionSecurityContextRepository())
        .authorizeExchange()
        .anyExchange().authenticated()
        .and()
        .build();
}
项目:Learning-Spring-Boot-2.0-Second-Edition    文件:SecurityConfiguration.java   
@Bean
SecurityWebFilterChain springWebFilterChain(HttpSecurity http) {
    return http
        .authorizeExchange()
            .pathMatchers("/**").authenticated()
            .and()
        .build();
}
项目:Learning-Spring-Boot-2.0-Second-Edition    文件:SecurityConfiguration.java   
@Bean
SecurityWebFilterChain springWebFilterChain() {
    return HttpSecurity.http()
        .securityContextRepository(
            new WebSessionSecurityContextRepository())
        .authorizeExchange()
            .anyExchange().authenticated()
            .and()
        .build();
}
项目:Learning-Spring-Boot-2.0-Second-Edition    文件:SecurityConfiguration.java   
@Bean
SecurityWebFilterChain springWebFilterChain() {
    return HttpSecurity.http()
        .securityContextRepository(new WebSessionSecurityContextRepository())
        .authorizeExchange()
        .anyExchange().authenticated()
        .and()
        .build();
}
项目:Learning-Spring-Boot-2.0-Second-Edition    文件:SecurityConfiguration.java   
@Bean
SecurityWebFilterChain springWebFilterChain(HttpSecurity http) {
    return http
        .authorizeExchange()
        .pathMatchers("/**").authenticated()
        .and()
        .build();
}
项目:spring-reactive-sample    文件:DemoApplication.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
            .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
               .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
            //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
            .anyExchange().authenticated()
            .and()
        .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
            .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
               .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
            //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
            .anyExchange().authenticated()
            .and()
        .build();
}
项目:spring-reactive-sample    文件:DemoApplication.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
            .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
               .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
            //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
            .anyExchange().authenticated()
            .and()
        .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
        .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
        .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
        //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
        .anyExchange().authenticated()
        .and()
        .build();
}
项目:spring-reactive-sample    文件:DemoApplication.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
        .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
        .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
        //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
        .anyExchange().authenticated()
        .and()
        .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
           .csrf().disable()
        .authorizeExchange()
            .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
               .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
            //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
            .anyExchange().authenticated()
            .and()
        .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
            .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
               .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
            //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
            .anyExchange().authenticated()
            .and()
        .build();
}
项目:spring-reactive-sample    文件:DemoApplication.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
            .authorizeExchange()
            .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
            .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
            .pathMatchers("/posts/**").authenticated()
            //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
            .anyExchange().permitAll()
            .and()
            .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
            .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
               //.pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")//replace this with method level constraints
            //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
            .anyExchange().authenticated()
            .and()
        .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
        //.pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
        //.pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
        //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
        .anyExchange().authenticated()
        .and()
        .build();
}
项目:spring-reactive-sample    文件:DemoApplication.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
        .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
        .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
        //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
        .anyExchange().authenticated()
        .and()
        .build();
}
项目:spring-reactive-sample    文件:DemoApplication.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
        .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
        .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
        //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
        .anyExchange().authenticated()
        .and()
        .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
        .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
        .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
        //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
        .anyExchange().authenticated()
        .and()
        .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
 SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
         .csrf().disable()
             //.and()
.authorizeExchange()
    .anyExchange().authenticated()
    .and()
.httpBasic().securityContextRepository(new WebSessionServerSecurityContextRepository())
    .and()
.formLogin()
    .and()
         .build();
 }
项目:spring-reactive-sample    文件:DemoApplication.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
        .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
        .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
        //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
        .anyExchange().authenticated()
        .and()
        .build();
}
项目:spring-reactive-sample    文件:DemoApplication.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
        .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
        .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
        //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
        .anyExchange().authenticated()
        .and()
        .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
            .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
               .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
            //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
            .anyExchange().authenticated()
            .and()
        .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
            .authorizeExchange()
            .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
            .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
            .pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
            .anyExchange().authenticated()
            .and()
            .build();
}
项目:spring-reactive-sample    文件:SecurityConfig.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
            .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
               .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
            //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
            .anyExchange().authenticated()
            .and()
        .build();
}
项目:spring-reactive-sample    文件:DemoApplication.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http
        .authorizeExchange()
        .pathMatchers(HttpMethod.GET, "/posts/**").permitAll()
        .pathMatchers(HttpMethod.DELETE, "/posts/**").hasRole("ADMIN")
        .pathMatchers("/posts/**").authenticated()
        //.pathMatchers("/users/{user}/**").access(this::currentUserMatchesPath)
        .anyExchange().permitAll()
        .and()
        .build();
}
项目:AngularAndSpring    文件:WebfluxSecurityConfig.java   
@Bean
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) {
    http
        .authorizeExchange()
            .anyExchange().authenticated()
            .and()
        .httpBasic();
    return http.build();
}
项目:spring-cloud-gateway    文件:PermitAllSecurityConfiguration.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http.authorizeExchange()
            .anyExchange().permitAll()
            .and()
            .csrf().disable()
            .build();
}
项目:spring-cloud-gateway    文件:PrincipalNameKeyResolverIntegrationTests.java   
@Bean
SecurityWebFilterChain springWebFilterChain(ServerHttpSecurity http) throws Exception {
    return http.httpBasic().and()
            .authorizeExchange()
            .pathMatchers("/myapi/**").authenticated()
            .anyExchange().permitAll()
            .and()
            .build();
}
项目:spring-boot-admin    文件:SpringBootAdminApplication.java   
@Bean
@Profile("insecure")
public SecurityWebFilterChain securityWebFilterChainPermitAll(ServerHttpSecurity http) {
    return http.authorizeExchange().anyExchange().permitAll()//
               .and().csrf().disable()//
               .build();
}
项目:spring-boot-admin    文件:AdminApplicationHazelcastTest.java   
@Bean
SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
    return http.authorizeExchange().anyExchange().permitAll()//
               .and().csrf().disable()//
               .build();
}
项目:spring-boot-admin    文件:AdminApplicationDiscoveryTest.java   
@Bean
SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
    return http.authorizeExchange().anyExchange().permitAll()//
               .and().csrf().disable()//
               .build();
}
项目:spring-boot-admin    文件:AdminApplicationTest.java   
@Bean
public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
    return http.authorizeExchange().anyExchange().permitAll()//
               .and().csrf().disable()//
               .build();
}