class DefaultOidcConfigurationService implements OidcConfigurationService {

	@Override
	public OAuth2ServiceEndpointsProvider retrieveEndpoints(@Nonnull URI discoveryEndpointUri)
			throws OAuth2ServiceException {
		Assertions.assertNotNull(discoveryEndpointUri, "discoveryEndpointUri must not be null!");

		HttpUriRequest request = new HttpGet(discoveryEndpointUri);
		try (CloseableHttpResponse response = httpClient.execute(request)) {
			String bodyAsString = HttpClientUtil.extractResponseBodyAsString(response);
			int statusCode = response.getStatusLine().getStatusCode();
			return handleResponse(bodyAsString, statusCode, discoveryEndpointUri);
		} catch (IOException e) {
			throw OAuth2ServiceException.builder("Error retrieving configured oidc endpoints: " + e.getMessage())
					.withUri(discoveryEndpointUri)
					.build();
		}
	}

	public  DefaultOidcConfigurationService();
	public  DefaultOidcConfigurationService(CloseableHttpClient httpClient);

}