public static Set<Event> resolveEventViaMultivaluedAttribute(
        final Principal principal,
        final Object attributeValue,
        final RegisteredService registeredService,
        final Service service,
        final Optional<RequestContext> context,
        final MultifactorAuthenticationProvider provider,
        final BiPredicate<String, MultifactorAuthenticationProvider> predicate) {

        if (attributeValue instanceof final Collection values) {
            LOGGER.debug("Attribute value [{}] is a multi-valued attribute", attributeValue);
            val events = new HashSet<Event>();
            values.forEach(value -> {
                val providerId = provider.getId();
                try {
                    LOGGER.trace("Testing attribute value [{}] against multifactor provider [{}]", value, provider);
                    if (predicate.test(value.toString(), provider)) {
                        val attributeMap = buildEventAttributeMap(principal,
                            Optional.ofNullable(service), Optional.ofNullable(registeredService), provider);
                        LOGGER.trace("Event attribute map for provider [{}] transition is [{}]", provider, attributeMap);
                        val event = validateEventIdForMatchingTransitionInContext(providerId, context, attributeMap);
                        events.add(event);
                    }
                } catch (final Exception e) {
                    LOGGER.debug("Ignoring [{}] since no matching transition could be found for provider [{}]", value, providerId);
                }
            });
            return events
                .stream()
                .filter(CollectionUtils.distinctByKey(Event::getId))
                .collect(Collectors.toSet());
        }
        LOGGER.debug("Attribute value [{}] is not a multi-valued attribute", attributeValue);
        return null;
    }
Resolve event via multivalued attribute set.

@param principal         the principal
@param attributeValue    the attribute value
@param registeredService the service
@param service           the service
@param context           the context
@param provider          the provider
@param predicate         the predicate
@return the set
core/cas-server-core-authentication-mfa-api/src/main/java/org/apereo/cas/authentication/MultifactorAuthenticationUtils.java