@Override
    public Optional<MultifactorAuthenticationProvider> isActivated(final Authentication authentication,
                                                                   final RegisteredService registeredService,
                                                                   final HttpServletRequest request,
                                                                   final HttpServletResponse response,
                                                                   final Service service) {
        if (authentication == null) {
            LOGGER.debug("No authentication or service is available to determine event for principal");
            return Optional.empty();
        }
        if (!supports(authentication)) {
            LOGGER.trace("Authentication attempt does not qualify for radius multifactor authentication");
            return Optional.empty();
        }
        
        val providerMap = MultifactorAuthenticationUtils.getAvailableMultifactorAuthenticationProviders(this.applicationContext);
        if (providerMap.isEmpty()) {
            LOGGER.error("No multifactor authentication providers are available in the application context");
            throw new AuthenticationException(new MultifactorAuthenticationProviderAbsentException());
        }

        val id = casProperties.getAuthn().getMfa().getRadius().getId();
        LOGGER.debug("Authentication requires multifactor authentication via provider [{}]", id);
        return MultifactorAuthenticationUtils.resolveProvider(providerMap, id);

    }
This is {@link RadiusAccessChallengedMultifactorAuthenticationTrigger}.

@author Misagh Moayyed
@since 6.0.0
support/cas-server-support-radius/src/main/java/org/apereo/cas/adaptors/radius/web/flow/RadiusAccessChallengedMultifactorAuthenticationTrigger.java