@Override
    public AuthenticationPolicyExecutionResult isSatisfiedByInternal(final Authentication authn) {
        LOGGER.debug("Examining authentication successes for authentication handler [{}]", getHandlerNames());
        if (!getHandlerNames().isEmpty()) {
            val credsOk = authn.getSuccesses()
                .keySet()
                .stream()
                .anyMatch(s -> getHandlerNames().contains(s));

            if (!credsOk) {
                LOGGER.info("Required authentication handler(s) [{}] is not present in the list of successful authentications [{}]",
                    getHandlerNames(), authn.getSuccesses().keySet());
                return AuthenticationPolicyExecutionResult.failure();
            }
        }
        LOGGER.trace("Authentication policy is satisfied");
        return AuthenticationPolicyExecutionResult.success();
    }
Authentication security policy that is satisfied iff a specified
authentication handler successfully authenticates
at least one credential.

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