Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d4e00e4

Browse files
committed
Reduce Comments
Given that the codebase uses getBeanIfUnique logic in many places, it is a little noisy to clarify how it works in just this location. Instead, the previous commit simplifies the branching logic, reducing the need for clarification of what could otherwise be surprising. Signed-off-by: Josh Cummings <3627351+jzheaux@users.noreply.github.com>
1 parent d06ef17 commit d4e00e4

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

‎config/src/main/java/org/springframework/security/config/annotation/authentication/configuration/InitializeUserDetailsBeanManagerConfigurer.java‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,7 @@ public void configure(AuthenticationManagerBuilder auth) {
8484
return;
8585
}
8686

87-
// Try to resolve a single candidate using the container's rules (@Primary,
88-
// etc.)
8987
UserDetailsService userDetailsService = getBeanIfUnique(UserDetailsService.class);
90-
91-
// If ambiguous or otherwise not resolvable, keep the warn-and-skip behavior
9288
if (userDetailsService == null) {
9389
this.logger.warn(LogMessage.format("Found %s UserDetailsService beans, with names %s. "
9490
+ "Global Authentication Manager will not use a UserDetailsService for username/password login. "
@@ -98,7 +94,6 @@ public void configure(AuthenticationManagerBuilder auth) {
9894
}
9995

10096
PasswordEncoder passwordEncoder = getBeanIfUnique(PasswordEncoder.class);
101-
// Also resolve UDPS via container so @Primary is honored
10297
UserDetailsPasswordService passwordManager = getAutowireCandidateOrNull(UserDetailsPasswordService.class);
10398
CompromisedPasswordChecker passwordChecker = getBeanIfUnique(CompromisedPasswordChecker.class);
10499

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /