public class UserDetailsRepositoryReactiveAuthenticationManager extends java.lang.Object implements ReactiveAuthenticationManager
ReactiveAuthenticationManagerthat uses a
ReactiveUserDetailsServiceto validate the provided username and password.
|Constructor and Description|
|Modifier and Type||Method and Description|
Attempts to authenticate the provided
Sets the service to use for upgrading passwords on successful authentication.
public UserDetailsRepositoryReactiveAuthenticationManager(ReactiveUserDetailsService userDetailsService)
public reactor.core.publisher.Mono<Authentication> authenticate(Authentication authentication)
Authenticationis returned. If authentication cannot be determined, an empty Mono is returned. If authentication fails, a Mono error is returned.
public void setPasswordEncoder(PasswordEncoder passwordEncoder)
PasswordEncoderthat is used for validating the password. The default is
PasswordEncoderto use. Cannot be null
public void setScheduler(reactor.core.scheduler.Scheduler scheduler)
Schedulerused by the
UserDetailsRepositoryReactiveAuthenticationManager. The default is
Schedulers.parallel()because modern password encoding is a CPU intensive task that is non blocking. This means validation is bounded by the number of CPUs. Some applications may want to customize the
Scheduler. For example, if users are stuck using the insecure
NoOpPasswordEncoderthey might want to leverage
Schedulerto use. Cannot be null.
public void setUserDetailsPasswordService(ReactiveUserDetailsPasswordService userDetailsPasswordService)
userDetailsPasswordService- the service to use