public AuthenticationInfo beforeAttempt(Realm realm, AuthenticationToken token, AuthenticationInfo aggregate)
            throws AuthenticationException {
        if (getStopAfterFirstSuccess() && aggregate != null && !isEmpty(aggregate.getPrincipals())) {
            throw new ShortCircuitIterationException();
        }
        return aggregate;
    }
Throws ShortCircuitIterationException if stopAfterFirstSuccess is set and authentication is
successful with a previously consulted realm.
Returns the <code>aggregate</code> method argument, without modification
otherwise.
core/src/main/java/org/apache/shiro/authc/pam/FirstSuccessfulStrategy.java