public class UserDetailsRepositoryReactiveAuthenticationManager extends java.lang.Object implements ReactiveAuthenticationManager
ReactiveAuthenticationManager that uses a ReactiveUserDetailsService to validate the provided
username and password.| Constructor and Description |
|---|
UserDetailsRepositoryReactiveAuthenticationManager(ReactiveUserDetailsService userDetailsService) |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<Authentication> |
authenticate(Authentication authentication)
Attempts to authenticate the provided
Authentication |
void |
setPasswordEncoder(PasswordEncoder passwordEncoder)
The
PasswordEncoder that is used for validating the password. |
void |
setPostAuthenticationChecks(UserDetailsChecker postAuthenticationChecks)
Sets the strategy which will be used to validate the loaded UserDetails
object after authentication occurs.
|
void |
setScheduler(reactor.core.scheduler.Scheduler scheduler)
Sets the
Scheduler used by the UserDetailsRepositoryReactiveAuthenticationManager. |
void |
setUserDetailsPasswordService(ReactiveUserDetailsPasswordService userDetailsPasswordService)
Sets the service to use for upgrading passwords on successful authentication.
|
public UserDetailsRepositoryReactiveAuthenticationManager(ReactiveUserDetailsService userDetailsService)
public reactor.core.publisher.Mono<Authentication> authenticate(Authentication authentication)
ReactiveAuthenticationManagerAuthenticationauthenticate in interface ReactiveAuthenticationManagerauthentication - the Authentication to testAuthentication is returned. If
authentication cannot be determined, an empty Mono is returned. If authentication
fails, a Mono error is returned.public void setPasswordEncoder(PasswordEncoder passwordEncoder)
PasswordEncoder that is used for validating the password. The default is
PasswordEncoderFactories.createDelegatingPasswordEncoder()passwordEncoder - the PasswordEncoder to use. Cannot be nullpublic void setScheduler(reactor.core.scheduler.Scheduler scheduler)
Scheduler used 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 NoOpPasswordEncoder
they might want to leverage Schedulers.immediate().scheduler - the Scheduler to use. Cannot be null.public void setUserDetailsPasswordService(ReactiveUserDetailsPasswordService userDetailsPasswordService)
userDetailsPasswordService - the service to usepublic void setPostAuthenticationChecks(UserDetailsChecker postAuthenticationChecks)
postAuthenticationChecks - The UserDetailsChecker