private static Set<Event> buildEventForMultifactorProvider(
        final RequestContext context,
        final Service service,
        final RegisteredService registeredService,
        final Authentication authentication,
        final String id,
        final MultifactorAuthenticationProvider provider) {
        val attributeMap = MultifactorAuthenticationUtils.buildEventAttributeMap(authentication.getPrincipal(),
            Optional.ofNullable(service), Optional.ofNullable(registeredService), provider);
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);
        attributeMap.put("url", HttpRequestUtils.getFullRequestUrl(request));
        LOGGER.trace("Event attribute map for [{}] is [{}]", id, attributeMap);
        val resultEvent = MultifactorAuthenticationUtils.validateEventIdForMatchingTransitionInContext(id, Optional.of(context), attributeMap);
        LOGGER.trace("Finalized event for multifactor provider  [{}] is [{}]", id, resultEvent);
        return CollectionUtils.wrapSet(resultEvent);
    }
This is {@link RankedMultifactorAuthenticationProviderWebflowEventResolver}.

@author Misagh Moayyed
@since 5.0.0
core/cas-server-core-webflow-mfa-api/src/main/java/org/apereo/cas/web/flow/resolver/impl/RankedMultifactorAuthenticationProviderWebflowEventResolver.java