use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class CanDiscoverIdentifiersUsingUrlSyntax method urlNormalization6.
@Test
public void urlNormalization6() throws Exception {
String resource = "https://example.com:8080/joe?param=value";
String expectedHost = "example.com:8080";
String expectedPath = "/joe";
OpenIdConnectDiscoveryRequest openIdConnectDiscoveryRequest = new OpenIdConnectDiscoveryRequest(resource);
assertEquals(openIdConnectDiscoveryRequest.getResource(), resource);
assertEquals(openIdConnectDiscoveryRequest.getHost(), expectedHost);
assertEquals(openIdConnectDiscoveryRequest.getPath(), expectedPath);
}
use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class CanDiscoverIdentifiersUsingUrlSyntax method urlNormalization7.
@Test
public void urlNormalization7() throws Exception {
String resource = "https://example.com:8080/joe?param1=foo¶m2=bar#fragment";
String expectedHost = "example.com:8080";
String expectedPath = "/joe";
OpenIdConnectDiscoveryRequest openIdConnectDiscoveryRequest = new OpenIdConnectDiscoveryRequest(resource);
assertEquals(openIdConnectDiscoveryRequest.getResource(), resource);
assertEquals(openIdConnectDiscoveryRequest.getHost(), expectedHost);
assertEquals(openIdConnectDiscoveryRequest.getPath(), expectedPath);
}
use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class OpenIDConnectDiscoveryHttpTest method emailNormalization5.
@Test
public void emailNormalization5() throws Exception {
String resource = "joe@localhost";
String expectedHost = "localhost";
String expectedPath = null;
OpenIdConnectDiscoveryRequest openIdConnectDiscoveryRequest = new OpenIdConnectDiscoveryRequest(resource);
assertEquals(openIdConnectDiscoveryRequest.getResource(), resource);
assertEquals(openIdConnectDiscoveryRequest.getHost(), expectedHost);
assertEquals(openIdConnectDiscoveryRequest.getPath(), expectedPath);
}
use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class OpenIDConnectDiscoveryHttpTest method urlNormalization6.
@Test
public void urlNormalization6() throws Exception {
String resource = "https://example.com:8080/joe?param=value";
String expectedHost = "example.com:8080";
String expectedPath = "/joe";
OpenIdConnectDiscoveryRequest openIdConnectDiscoveryRequest = new OpenIdConnectDiscoveryRequest(resource);
assertEquals(openIdConnectDiscoveryRequest.getResource(), resource);
assertEquals(openIdConnectDiscoveryRequest.getHost(), expectedHost);
assertEquals(openIdConnectDiscoveryRequest.getPath(), expectedPath);
}
use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class OpenIDConnectDiscoveryHttpTest method hostNormalization1.
@Test
public void hostNormalization1() throws Exception {
String resource = "example.com";
String expectedHost = "example.com";
String expectedPath = null;
OpenIdConnectDiscoveryRequest openIdConnectDiscoveryRequest = new OpenIdConnectDiscoveryRequest(resource);
assertEquals(openIdConnectDiscoveryRequest.getResource(), resource);
assertEquals(openIdConnectDiscoveryRequest.getHost(), expectedHost);
assertEquals(openIdConnectDiscoveryRequest.getPath(), expectedPath);
}
Aggregations