Skip to content

Commit cb5c58e

Browse files
committed
AbstractUserDetailsReactiveAuthenticationManager uses newParallel
It is recommended to use newParallel to avoid impacting the timed operations which all use parallel() Fixes gh-7456
1 parent eeb0f56 commit cb5c58e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/main/java/org/springframework/security/authentication/AbstractUserDetailsReactiveAuthenticationManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public abstract class AbstractUserDetailsReactiveAuthenticationManager implement
5555

5656
private ReactiveUserDetailsPasswordService userDetailsPasswordService;
5757

58-
private Scheduler scheduler = Schedulers.parallel();
58+
private Scheduler scheduler = Schedulers.newParallel("password-encoder");
5959

6060
private UserDetailsChecker preAuthenticationChecks = user -> {
6161
if (!user.isAccountNonLocked()) {
@@ -127,7 +127,7 @@ public void setPasswordEncoder(PasswordEncoder passwordEncoder) {
127127

128128
/**
129129
* Sets the {@link Scheduler} used by the {@link UserDetailsRepositoryReactiveAuthenticationManager}.
130-
* The default is {@code Schedulers.parallel()} because modern password encoding is
130+
* The default is {@code Schedulers.newParallel(String)} because modern password encoding is
131131
* a CPU intensive task that is non blocking. This means validation is bounded by the
132132
* number of CPUs. Some applications may want to customize the {@link Scheduler}. For
133133
* example, if users are stuck using the insecure {@link org.springframework.security.crypto.password.NoOpPasswordEncoder}

0 commit comments

Comments
 (0)