use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class CanDiscoverIdentifiersUsingUrlSyntax 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 CanDiscoverIdentifiersUsingUrlSyntax 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 CanDiscoverIdentifiersUsingEMailSyntax 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 CanDiscoverIdentifiersUsingEMailSyntax method emailNormalization4.
@Test
public void emailNormalization4() throws Exception {
String resource = "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);
}
use of org.xdi.oxauth.client.OpenIdConnectDiscoveryRequest in project oxAuth by GluuFederation.
the class CanDiscoverIdentifiersUsingUrlSyntax 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);
}
Aggregations