@Test public void retrieveIssuerEndpoints_executesHttpGetRequestWithCorrectURI() throws IOException { URI discoveryEndpoint1 = DefaultOidcConfigurationService .getDiscoveryEndpointUri("https: URI discoveryEndpoint2 = DefaultOidcConfigurationService .getDiscoveryEndpointUri("https: URI discoveryEndpoint3 = DefaultOidcConfigurationService .getDiscoveryEndpointUri("https: URI discoveryEndpoint4 = DefaultOidcConfigurationService .getDiscoveryEndpointUri("https: URI discoveryEndpoint5 = DefaultOidcConfigurationService .getDiscoveryEndpointUri("sub.myauth.com/path"); assertThat(discoveryEndpoint1.toString()).isEqualTo("https: assertThat(discoveryEndpoint2.toString()).isEqualTo("https: assertThat(discoveryEndpoint3.toString()) .isEqualTo("https: assertThat(discoveryEndpoint4.toString()) .isEqualTo("https: assertThat(discoveryEndpoint5.toString()) .isEqualTo("https: }
public static URI getDiscoveryEndpointUri(@Nonnull String issuerUri) { URI uri = URI.create(issuerUri.startsWith("http") ? issuerUri : "https: return UriUtil.expandPath(uri, DISCOVERY_ENDPOINT_DEFAULT); }
DefaultOidcConfigurationService implements OidcConfigurationService { public static URI getDiscoveryEndpointUri(@Nonnull String issuerUri) { URI uri = URI.create(issuerUri.startsWith("http") ? issuerUri : "https: return UriUtil.expandPath(uri, DISCOVERY_ENDPOINT_DEFAULT); } }
DefaultOidcConfigurationService implements OidcConfigurationService { public static URI getDiscoveryEndpointUri(@Nonnull String issuerUri) { URI uri = URI.create(issuerUri.startsWith("http") ? issuerUri : "https: return UriUtil.expandPath(uri, DISCOVERY_ENDPOINT_DEFAULT); } DefaultOidcConfigurationService();  DefaultOidcConfigurationService(CloseableHttpClient httpClient); }
DefaultOidcConfigurationService implements OidcConfigurationService { public static URI getDiscoveryEndpointUri(@Nonnull String issuerUri) { URI uri = URI.create(issuerUri.startsWith("http") ? issuerUri : "https: return UriUtil.expandPath(uri, DISCOVERY_ENDPOINT_DEFAULT); } DefaultOidcConfigurationService();  DefaultOidcConfigurationService(CloseableHttpClient httpClient); static URI getDiscoveryEndpointUri(@Nonnull String issuerUri); @Override OAuth2ServiceEndpointsProvider retrieveEndpoints(@Nonnull URI discoveryEndpointUri); }
DefaultOidcConfigurationService implements OidcConfigurationService { public static URI getDiscoveryEndpointUri(@Nonnull String issuerUri) { URI uri = URI.create(issuerUri.startsWith("http") ? issuerUri : "https: return UriUtil.expandPath(uri, DISCOVERY_ENDPOINT_DEFAULT); } DefaultOidcConfigurationService();  DefaultOidcConfigurationService(CloseableHttpClient httpClient); static URI getDiscoveryEndpointUri(@Nonnull String issuerUri); @Override OAuth2ServiceEndpointsProvider retrieveEndpoints(@Nonnull URI discoveryEndpointUri);  }