@Override
    public Set<Event> resolveInternal(final RequestContext context) throws Throwable {
        val registeredService = resolveRegisteredServiceInRequestContext(context);
        val service = resolveServiceFromAuthenticationRequest(context);
        val authentication = WebUtils.getAuthentication(context);
        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);
        val response = WebUtils.getHttpServletResponseFromExternalWebflowContext(context);
        val result = determineMultifactorAuthenticationProvider(registeredService, authentication, request, response, service);
        return result
            .map(provider -> {
                LOGGER.trace("Building event based on the authentication provider [{}] and service [{}]", provider, registeredService);
                val eventMap = MultifactorAuthenticationUtils.buildEventAttributeMap(authentication.getPrincipal(),
                    Optional.ofNullable(service), Optional.ofNullable(registeredService), provider);
                eventMap.put(MultifactorAuthenticationTrigger.class.getSimpleName(), multifactorAuthenticationTrigger.getName());
                val event = MultifactorAuthenticationUtils.validateEventIdForMatchingTransitionInContext(
                    provider.getId(), Optional.of(context), eventMap);
                return CollectionUtils.wrapSet(event);
            })
            .orElse(null);
    }
This is {@link DefaultMultifactorAuthenticationProviderWebflowEventResolver}.

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