Skip to content

Commit 4a6e0a1

Browse files
committed
Update DaoAuthenticationProvider Usage
Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
1 parent fc630ae commit 4a6e0a1

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

core/src/test/java/org/springframework/security/authentication/dao/DaoAuthenticationProviderTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,10 @@ public void testSec2056() {
467467
public void testDisabledUserTiming() {
468468
UsernamePasswordAuthenticationToken user = UsernamePasswordAuthenticationToken.unauthenticated("rod", "koala");
469469
PasswordEncoder encoder = new BCryptPasswordEncoder();
470-
DaoAuthenticationProvider provider = new DaoAuthenticationProvider();
471-
provider.setPasswordEncoder(encoder);
472470
MockUserDetailsServiceUserRod users = new MockUserDetailsServiceUserRod();
473471
users.password = encoder.encode((CharSequence) user.getCredentials());
474-
provider.setUserDetailsService(users);
472+
DaoAuthenticationProvider provider = new DaoAuthenticationProvider(users);
473+
provider.setPasswordEncoder(encoder);
475474
int sampleSize = 100;
476475
List<Long> enabledTimes = new ArrayList<>(sampleSize);
477476
for (int i = 0; i < sampleSize; i++) {

0 commit comments

Comments
 (0)