Search in sources :

Example 1 with GetIssuerParams

use of io.jans.ca.common.params.GetIssuerParams in project jans by JanssenProject.

the class GetIssuerTest method hostnameInputTest.

@Parameters({ "host", "opHost", "hostnameWebfingerInput" })
@Test
public void hostnameInputTest(String host, String opHost, String hostnameWebfingerInput) {
    ClientInterface client = Tester.newClient(host);
    final GetIssuerParams params = new GetIssuerParams();
    params.setResource(hostnameWebfingerInput);
    params.setOpHost(opHost);
    final GetIssuerResponse resp = client.getIssuer(params);
    assertNotNull(resp);
    assertEquals(resp.getSubject(), hostnameWebfingerInput);
    resp.getLinks().forEach((link) -> {
        assertEquals(link.getHref(), opHost);
    });
}
Also used : GetIssuerResponse(io.jans.ca.common.response.GetIssuerResponse) GetIssuerParams(io.jans.ca.common.params.GetIssuerParams) ClientInterface(io.jans.ca.client.ClientInterface) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test)

Example 2 with GetIssuerParams

use of io.jans.ca.common.params.GetIssuerParams in project jans by JanssenProject.

the class GetIssuerTest method emailInputTest.

@Parameters({ "host", "opHost", "emailWebfingerInput" })
@Test(enabled = false)
public void emailInputTest(String host, String opHost, String emailWebfingerInput) {
    ClientInterface client = Tester.newClient(host);
    final GetIssuerParams params = new GetIssuerParams();
    params.setResource(emailWebfingerInput);
    params.setOpHost(opHost);
    final GetIssuerResponse resp = client.getIssuer(params);
    assertNotNull(resp);
    assertEquals(resp.getSubject(), emailWebfingerInput);
    resp.getLinks().forEach((link) -> {
        assertEquals(link.getHref(), opHost);
    });
}
Also used : GetIssuerResponse(io.jans.ca.common.response.GetIssuerResponse) GetIssuerParams(io.jans.ca.common.params.GetIssuerParams) ClientInterface(io.jans.ca.client.ClientInterface) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test)

Example 3 with GetIssuerParams

use of io.jans.ca.common.params.GetIssuerParams in project jans by JanssenProject.

the class GetIssuerTest method urlInputTest.

@Parameters({ "host", "opHost", "urlWebfingerInput" })
@Test(enabled = false)
public void urlInputTest(String host, String opHost, String urlWebfingerInput) {
    ClientInterface client = Tester.newClient(host);
    final GetIssuerParams params = new GetIssuerParams();
    params.setResource(urlWebfingerInput);
    params.setOpHost(opHost);
    final GetIssuerResponse resp = client.getIssuer(params);
    assertNotNull(resp);
    assertEquals(resp.getSubject(), urlWebfingerInput);
    resp.getLinks().forEach((link) -> {
        assertEquals(link.getHref(), opHost);
    });
}
Also used : GetIssuerResponse(io.jans.ca.common.response.GetIssuerResponse) GetIssuerParams(io.jans.ca.common.params.GetIssuerParams) ClientInterface(io.jans.ca.client.ClientInterface) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test)

Aggregations

ClientInterface (io.jans.ca.client.ClientInterface)3 GetIssuerParams (io.jans.ca.common.params.GetIssuerParams)3 GetIssuerResponse (io.jans.ca.common.response.GetIssuerResponse)3 Parameters (org.testng.annotations.Parameters)3 Test (org.testng.annotations.Test)3