@Override
    protected Event doPreExecute(final RequestContext requestContext) throws Exception {
        val providerId = MultifactorAuthenticationWebflowUtils.getMultifactorAuthenticationProvider(requestContext);
        val applicationContext = requestContext.getActiveFlow().getApplicationContext();
        this.provider = (T) MultifactorAuthenticationUtils.getMultifactorAuthenticationProviderById(providerId, applicationContext)
            .orElseThrow(() -> new AuthenticationException("Unable to determine multifactor authentication provider for " + providerId));
        Assert.isTrue(providerId.equalsIgnoreCase(provider.getId()),
            "Requested provider id %s does not match the available provider id %s".formatted(providerId, provider.getId()));
        return super.doPreExecute(requestContext);
    }
The resolved provider for this flow.
core/cas-server-core-webflow-mfa-api/src/main/java/org/apereo/cas/web/flow/actions/AbstractMultifactorAuthenticationAction.java