@Override
    public HealthCheck.Result getHealth() {
        final HealthCheck.ResultBuilder resultBuilder = HealthCheck.Result.builder();
        final AbstractOpenIdConfig abstractOpenIdConfig = localOpenIdConfigProvider.get();
        final String configurationEndpoint = abstractOpenIdConfig.getOpenIdConfigurationEndpoint();
        final IdpType idpType = abstractOpenIdConfig.getIdentityProviderType();
        LOGGER.debug("Checking health, idpType: {}, configurationEndpoint: {}", idpType, configurationEndpoint);

        if (!IdpType.EXTERNAL_IDP.equals(idpType)) {
            resultBuilder
                    .healthy()
                    .withMessage("Not using external IDP (Using "
                                 + abstractOpenIdConfig.getIdentityProviderType().toString().toLowerCase() + ")");
        } else if (NullSafe.isBlankString(configurationEndpoint)) {
            resultBuilder
                    .unhealthy()
                    .withMessage(LogUtil.message("Property {} is false, but {} is unset. " +
                                                 "You must provide the configuration endpoint for the external IDP.",
                            abstractOpenIdConfig.getFullPathStr(AbstractOpenIdConfig.PROP_NAME_IDP_TYPE),
                            abstractOpenIdConfig.getFullPathStr(AbstractOpenIdConfig.PROP_NAME_CONFIGURATION_ENDPOINT)
                    ));
        } else {
            // Hit the config endpoint to check the IDP is accessible.
            // Even if we already have the config from it, if we can't see the IDP we have problems.
            try {
                resultBuilder.withDetail("configUri", configurationEndpoint);
                OpenIdConfigurationResponse response = fetchOpenIdConfigurationResponse(
                        configurationEndpoint, abstractOpenIdConfig);
                if (response != null) {
                    resultBuilder.healthy();
                } else {
                    resultBuilder.unhealthy()
                            .withMessage("Null response");
                }
            } catch (Exception e) {
                resultBuilder.unhealthy(e)
                        .withMessage("Error fetching Open ID Connect configuration from " +
                                     configurationEndpoint + ". Is the identity provider down?");
            }
        }
        return resultBuilder.build();
    }
Combines the values from {@link AbstractOpenIdConfig} with values obtained from the external
Open ID Connect IDP server.
stroom-security/stroom-security-common-impl/src/main/java/stroom/security/common/impl/ExternalIdpConfigurationProvider.java