use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class OpenIDConnectDiscoveryHttpTest method hostNormalization2.
@Test
public void hostNormalization2() throws Exception {
String resource = "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);
}
use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class OpenIDConnectDiscoveryHttpTest method emailNormalization2.
@Test
public void emailNormalization2() throws Exception {
String resource = "joe@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);
}
use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class OpenIDConnectDiscoveryHttpTest 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 hostNormalization4.
@Test
public void hostNormalization4() throws Exception {
String resource = "example.com:8080/path";
String expectedHost = "example.com:8080";
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 CanDiscoverIdentifiersUsingEMailSyntax method emailNormalization3.
@Test
public void emailNormalization3() throws Exception {
String resource = "acct:joe@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