class ZosmfService extends AbstractZosmfService {

    @Cacheable("zosmfAuthenticationEndpoint")
    public boolean authenticationEndpointExists(HttpMethod httpMethod) {
        String url = getURI(getZosmfServiceId()) + ZOSMF_AUTHENTICATE_END_POINT;

        final HttpHeaders headers = new HttpHeaders();
        headers.add(ZOSMF_CSRF_HEADER, "");

        try {
            restTemplateWithoutKeystore.exchange(url, httpMethod, new HttpEntity<>(null, headers), String.class);
        } catch (HttpClientErrorException hce) {
            if (hce.getStatusCode().equals(HttpStatus.UNAUTHORIZED)) {
                return true;
            }
            else if (hce.getStatusCode().equals(HttpStatus.NOT_FOUND)) {
                log.warn("The check of z/OSMF JWT authentication endpoint has failed, ensure APAR PH12143 " +
                    "(https://www.ibm.com/support/pages/apar/PH12143) fix has been applied. " +
                    "Using z/OSMF info endpoint as backup.");
                return false;
            }
            log.warn("The check of z/OSMF JWT authentication endpoint has failed with exception", hce);
        } catch (RuntimeException re) {
            log.warn("The check of z/OSMF JWT authentication endpoint has failed with exception", re);
        }
        return false;
    }

    public  ZosmfService(
        final AuthConfigurationProperties authConfigurationProperties,
        final DiscoveryClient discovery,
        final @Qualifier("restTemplateWithoutKeystore") RestTemplate restTemplateWithoutKeystore,
        final ObjectMapper securityObjectMapper
    );

}