From 4feef38be1e9e8f6ba4b801ce9cb2b251627efff Mon Sep 17 00:00:00 2001 From: ckyeon Date: Sun, 14 Dec 2025 09:48:37 +0900 Subject: [PATCH] Clarify AuthenticationManagerBuilder.authenticationProvider JavaDoc Signed-off-by: ckyeon --- .../builders/AuthenticationManagerBuilder.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/config/src/main/java/org/springframework/security/config/annotation/authentication/builders/AuthenticationManagerBuilder.java b/config/src/main/java/org/springframework/security/config/annotation/authentication/builders/AuthenticationManagerBuilder.java index 3bf07696685..b05f831ee95 100644 --- a/config/src/main/java/org/springframework/security/config/annotation/authentication/builders/AuthenticationManagerBuilder.java +++ b/config/src/main/java/org/springframework/security/config/annotation/authentication/builders/AuthenticationManagerBuilder.java @@ -200,17 +200,20 @@ public LdapAuthenticationProviderConfigurer ldapAu } /** - * Add authentication based upon the custom {@link AuthenticationProvider} that is - * passed in. Since the {@link AuthenticationProvider} implementation is unknown, all + * Adds the custom {@link AuthenticationProvider} to the list of providers. This + * method does not replace existing providers. it appends the new provider to the + * internal collection. + *

+ * Since the {@link AuthenticationProvider} implementation is unknown, all * customizations must be done externally and the {@link AuthenticationManagerBuilder} * is returned immediately. - * *

* This method does NOT ensure that the {@link UserDetailsService} is available * for the {@link #getDefaultUserDetailsService()} method. - * + *

* Note that an {@link Exception} might be thrown if an error occurs when adding the * {@link AuthenticationProvider}. + * @param authenticationProvider the {@link AuthenticationProvider} to add * @return a {@link AuthenticationManagerBuilder} to allow further authentication to * be provided to the {@link AuthenticationManagerBuilder} */