diff --git a/core/src/main/java/org/springframework/security/authentication/ProviderManager.java b/core/src/main/java/org/springframework/security/authentication/ProviderManager.java index 473436ac9f..7d6be070fd 100644 --- a/core/src/main/java/org/springframework/security/authentication/ProviderManager.java +++ b/core/src/main/java/org/springframework/security/authentication/ProviderManager.java @@ -136,9 +136,15 @@ public class ProviderManager implements AuthenticationManager, MessageSourceAwar * attempted with that AuthenticationProvider. *

* If more than one AuthenticationProvider supports the passed - * Authentication object, only the first - * AuthenticationProvider tried will determine the result. No subsequent - * AuthenticationProviders will be tried. + * Authentication object, the first one able to successfully + * authenticate the Authentication object determines the + * result, overriding any possible AuthenticationException + * thrown by earlier supporting AuthenticationProviders. + * On successful authentication, no subsequent AuthenticationProviders + * will be tried. + * If authentication was not successful by any supporting + * AuthenticationProvider the last thrown + * AuthenticationException will be rethrown. * * @param authentication the authentication request object. *