@ -29,9 +29,10 @@ import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties ;
import org.springframework.context.annotation.Conditional ;
import org.springframework.context.annotation.Configuration ;
import org.springframework.security.authentication. AuthenticationManager;
import org.springframework.security.authentication. Reactive AuthenticationManager;
import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity ;
import org.springframework.security.core.userdetails.ReactiveUserDetailsService ;
import org.springframework.security.web.server.SecurityWebFilterChain ;
import org.springframework.security.web.server.WebFilterChainProxy ;
import org.springframework.web.reactive.config.WebFluxConfigurer ;
@ -54,20 +55,20 @@ public class ReactiveSecurityAutoConfiguration {
@Configuration ( proxyBeanMethods = false )
@ConditionalOnMissingBean ( WebFilterChainProxy . class )
@ConditionalOnWebApplication ( type = ConditionalOnWebApplication . Type . REACTIVE )
@Conditional ( ReactiveAuthenticationManager Condition. class )
@Conditional ( EnableWebFluxSecurity Condition. class )
@EnableWebFluxSecurity
static class EnableWebFluxSecurityConfiguration {
}
static final class ReactiveAuthenticationManager Condition extends AnyNestedCondition {
static final class EnableWebFluxSecurity Condition extends AnyNestedCondition {
ReactiveAuthenticationManager Condition( ) {
EnableWebFluxSecurity Condition( ) {
super ( ConfigurationPhase . REGISTER_BEAN ) ;
}
@ConditionalOnBean ( AuthenticationManager. class )
static final class ConditionalOn AuthenticationManagerBean {
@ConditionalOnBean ( Reactive AuthenticationManager. class )
static final class ConditionalOn Reactive AuthenticationManagerBean {
}
@ -76,6 +77,11 @@ public class ReactiveSecurityAutoConfiguration {
}
@ConditionalOnBean ( SecurityWebFilterChain . class )
static final class ConditionalOnSecurityWebFilterChain {
}
}
}