@Override
    protected void doHealthCheck(final Health.Builder builder) {
        builder.withDetail("name", getClass().getSimpleName());
        val providers = applicationContext.getBeansOfType(DuoSecurityMultifactorAuthenticationProvider.class).values();
        providers
            .stream()
            .filter(Objects::nonNull)
            .filter(BeanSupplier::isNotProxy)
            .map(DuoSecurityMultifactorAuthenticationProvider::getDuoAuthenticationService)
            .forEach(duoService -> {
                val result = duoService.ping();
                val builderResult = builder.withDetail("duoApiHost", duoService.getProperties().getDuoApiHost());
                if (result) {
                    builderResult.up();
                } else {
                    builderResult.down();
                }
                builderResult.build();
            });
    }
This is {@link DuoSecurityHealthIndicator}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-duo-core-mfa/src/main/java/org/apereo/cas/adaptors/duo/DuoSecurityHealthIndicator.java