use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class OpenIDConnectDiscoveryHttpTest method urlNormalization4.
@Test
public void urlNormalization4() throws Exception {
String resource = "https://example.com:8080/joe";
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 emailNormalization6.
@Test
public void emailNormalization6() throws Exception {
String resource = "joe@localhost:8080";
String expectedHost = "localhost:8080";
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 hostNormalization3.
@Test
public void hostNormalization3() throws Exception {
String resource = "example.com/path";
String expectedHost = "example.com";
String expectedPath = "/path";
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 urlNormalization2.
@Test
public void urlNormalization2() throws Exception {
String resource = "https://example.com/joe";
String expectedHost = "example.com";
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 urlNormalization3.
@Test
public void urlNormalization3() throws Exception {
String resource = "https://example.com:8080/";
String expectedHost = "example.com:8080";
String expectedPath = null;
OpenIdConnectDiscoveryRequest openIdConnectDiscoveryRequest = new OpenIdConnectDiscoveryRequest(resource);
assertEquals(openIdConnectDiscoveryRequest.getResource(), resource);
assertEquals(openIdConnectDiscoveryRequest.getHost(), expectedHost);
assertEquals(openIdConnectDiscoveryRequest.getPath(), expectedPath);
}
Aggregations