@Override
    public Set<Event> resolveEventViaAttribute(final Principal principal,
                                               final Map<String, List<Object>> attributesToExamine,
                                               final Collection<String> attributeNames,
                                               final RegisteredService registeredService,
                                               final Service service,
                                               final Optional<RequestContext> context,
                                               final Collection<MultifactorAuthenticationProvider> providers,
                                               final BiPredicate<String, MultifactorAuthenticationProvider> predicate) {

        LOGGER.debug("Attributes to examine are [{}]", attributesToExamine);
        if (providers == null || providers.isEmpty()) {
            LOGGER.debug("No authentication provider is associated with this service");
            return null;
        }

        LOGGER.debug("Locating attribute value for attribute(s): [{}].", attributeNames);
        for (val attributeName : attributeNames) {
            val attributeValue = attributesToExamine.get(attributeName);
            if (attributeValue == null) {
                LOGGER.debug("Attribute value for [{}] to determine event is not configured for [{}]", attributeName, principal.getId());
                continue;
            }
            LOGGER.debug("Located attribute value [{}] for [{}]", attributeValue, attributeNames);

            for (val provider : providers) {
                var results = MultifactorAuthenticationUtils.resolveEventViaSingleAttribute(principal, attributeValue,
                    registeredService, service, context, provider, predicate);
                if (results == null || results.isEmpty()) {
                    results = MultifactorAuthenticationUtils.resolveEventViaMultivaluedAttribute(principal, attributeValue,
                        registeredService, service, context, provider, predicate);
                }
                if (results != null && !results.isEmpty()) {
                    LOGGER.debug("Resolved set of events based on the attribute [{}] are [{}]", attributeName, results);
                    return results;
                }
            }
        }
        LOGGER.debug("No set of events based on the attribute(s) [{}] could be matched", attributeNames);
        return null;
    }
This is {@link DefaultMultifactorAuthenticationProviderResolver}.

@author Misagh Moayyed
@since 6.0.0
core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/DefaultMultifactorAuthenticationProviderResolver.java