I'm trying to register my own AuthenticationProvider.
My config:
@EnableWebFluxSecurity
class SecurityConfig {
@Bean
fun customAuthenticationProvider(): CustomAuthenticationProvider {
return CustomAuthenticationProvider()
}
@Bean
fun securityWebFilterChain(http: ServerHttpSecurity): SecurityWebFilterChain {
return http.authorizeExchange()
.anyExchange().authenticated()
.and().build()
}
}
But since I use webflux I cannot use WebSecurityConfigurerAdapter.
What is correct way to enable such AuthenticationProvider?
Comment From: kkocel
@rwinch @rstoyanchev Hey guys maybe you can help me out with this?
Comment From: rwinch
Reactive Spring Security does not use an AuthenticationProvider. You can create a Bean of type ReactiveAuthenticationManager instead.
Comment From: d3bt3ch
@rwinch If I provide a custom ReactiveAuthenticationManager do I need to provided a ReactiveUserDetailsService ? In my use case I purposely do not want to provide a ReactiveUserDetailsService. Please suggest.