@Override
    public AuthenticationPolicyExecutionResult isSatisfiedBy(final Authentication authn,
                                                             final Set<AuthenticationHandler> authenticationHandlers,
                                                             final ConfigurableApplicationContext applicationContext,
                                                             final Map<String, ? extends Serializable> context) {
        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Successful authentications: [{}], current authentication handlers [{}]", authn.getSuccesses().keySet(),
                authenticationHandlers.stream().map(AuthenticationHandler::getName).collect(Collectors.joining(",")));
        }

        if (authn.getSuccesses().size() != authenticationHandlers.size()) {
            LOGGER.warn("Number of successful authentications, [{}], does not match the number of authentication handlers, [{}].",
                authn.getSuccesses().size(), authenticationHandlers.size());
            return AuthenticationPolicyExecutionResult.failure();
        }
        return AuthenticationPolicyExecutionResult.success(!authn.getSuccesses().isEmpty());
    }
Authentication security policy that is satisfied iff all given authentication handlers are successfully authenticated.

@author Marvin S. Addison
@since 4.0.0
core/cas-server-core-authentication-api/src/main/java/org/apereo/cas/authentication/policy/AllAuthenticationHandlersSucceededAuthenticationPolicy.java