protected MultifactorAuthenticationProvider selectMultifactorAuthenticationProvider(
        final RegisteredService service,
        final List<MultifactorAuthenticationProvider> providers) {
        val provider = providers.getLast();
        LOGGER.debug("Selected the provider [{}] for service [{}] out of [{}] providers", provider, service, providers.size());
        return provider;
    }
Select multifactor authentication provider.

@param service   the service
@param providers the providers
@return the multifactor authentication provider
core/cas-server-core-webflow-mfa-api/src/main/java/org/apereo/cas/web/flow/authentication/RankedMultifactorAuthenticationProviderSelector.java