瀏覽代碼

Javadoc on ProviderManager.authenticate clarification

Fixes gh-3722
hmolsen 9 年之前
父節點
當前提交
b248eae416
共有 1 個文件被更改,包括 9 次插入3 次删除
  1. 9 3
      core/src/main/java/org/springframework/security/authentication/ProviderManager.java

+ 9 - 3
core/src/main/java/org/springframework/security/authentication/ProviderManager.java

@@ -136,9 +136,15 @@ public class ProviderManager implements AuthenticationManager, MessageSourceAwar
 	 * attempted with that <code>AuthenticationProvider</code>.
 	 * <p>
 	 * If more than one <code>AuthenticationProvider</code> supports the passed
-	 * <code>Authentication</code> object, only the first
-	 * <code>AuthenticationProvider</code> tried will determine the result. No subsequent
-	 * <code>AuthenticationProvider</code>s will be tried.
+	 * <code>Authentication</code> object, the first one able to successfully
+	 * authenticate the <code>Authentication</code> object determines the
+	 * <code>result</code>, overriding any possible <code>AuthenticationException</code>
+	 * thrown by earlier supporting <code>AuthenticationProvider</code>s.
+	 * On successful authentication, no subsequent <code>AuthenticationProvider</code>s
+	 * will be tried.
+	 * If authentication was not successful by any supporting
+	 * <code>AuthenticationProvider</code> the last thrown
+	 * <code>AuthenticationException</code> will be rethrown.
 	 *
 	 * @param authentication the authentication request object.
 	 *