default Set<Event> resolveEventViaPrincipalAttribute(final Principal principal,
                                                         final Collection<String> attributeNames,
                                                         final RegisteredService registeredService,
                                                         final Service service,
                                                         final Optional<RequestContext> context,
                                                         final Collection<MultifactorAuthenticationProvider> providers,
                                                         final BiPredicate<String, MultifactorAuthenticationProvider> predicate) {
        if (attributeNames.isEmpty()) {
            LOGGER.trace("No attribute names are provided to trigger a multifactor authentication provider via [{}]", getName());
            return null;
        }

        if (providers == null || providers.isEmpty()) {
            LOGGER.error("No multifactor authentication providers are available in the application context");
            return null;
        }

        val resolvedPrincipal = resolvePrincipal(principal);
        LOGGER.debug("Multifactor authentication principal [{}] to evaluate for [{}] using attributes [{}]",
            resolvedPrincipal, providers, attributeNames);
        return resolveEventViaAttribute(principal, resolvedPrincipal.getAttributes(),
            attributeNames, registeredService, service, context, providers, predicate);
    }
Resolve event via principal attribute set.

@param principal         the principal
@param attributeNames    the attribute name
@param registeredService the service
@param service           the service
@param context           the context
@param providers         the providers
@param predicate         the predicate
@return the set of resolved events
api/cas-server-core-api-mfa/src/main/java/org/apereo/cas/authentication/MultifactorAuthenticationProviderResolver.java