@Override
    public AuthenticationPolicyExecutionResult isSatisfiedBy(final Authentication authn,
                                                             final Set<AuthenticationHandler> authenticationHandlers,
                                                             final ConfigurableApplicationContext applicationContext,
                                                             final Map<String, ? extends Serializable> context) {
        LOGGER.debug("Successful authentications: [{}], credentials: [{}]",
            authn.getSuccesses().keySet(), authn.getCredentials());
        if (authn.getSuccesses().size() != authn.getCredentials().size()) {
            LOGGER.warn("Number of successful authentications, [{}], does not match the number of provided credentials, [{}].",
                authn.getSuccesses().size(), authn.getCredentials().size());
            return AuthenticationPolicyExecutionResult.failure();
        }
        LOGGER.debug("Authentication policy is satisfied.");
        return AuthenticationPolicyExecutionResult.success();
    }
Authentication security policy that is satisfied iff all given credentials 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/AllCredentialsValidatedAuthenticationPolicy.java