Search in sources :

Example 1 with GetJwksParams

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

the class GetJwksTest method test.

@Test(enabled = false)
@Parameters({ "host", "opHost", "opDiscoveryPath" })
public void test(String host, String opHost, @Optional String opDiscoveryPath) {
    final ClientInterface client = Tester.newClient(host);
    final GetJwksParams params = new GetJwksParams();
    params.setOpHost(opHost);
    params.setOpDiscoveryPath(opDiscoveryPath);
    final GetJwksResponse response = client.getJwks(Tester.getAuthorization(), null, params);
    assertNotNull(response);
    assertNotNull(response.getKeys());
    assertFalse(response.getKeys().isEmpty());
}
Also used : GetJwksParams(io.jans.ca.common.params.GetJwksParams) GetJwksResponse(io.jans.ca.common.response.GetJwksResponse) ClientInterface(io.jans.ca.client.ClientInterface) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test)

Example 2 with GetJwksParams

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

the class GetJwksTest method test_withOpConfigurationEndpoint.

@Test
@Parameters({ "host", "opConfigurationEndpoint" })
public void test_withOpConfigurationEndpoint(String host, String opConfigurationEndpoint) {
    final ClientInterface client = Tester.newClient(host);
    final GetJwksParams params = new GetJwksParams();
    params.setOpConfigurationEndpoint(opConfigurationEndpoint);
    final GetJwksResponse response = client.getJwks(Tester.getAuthorization(), null, params);
    assertNotNull(response);
    assertNotNull(response.getKeys());
    assertFalse(response.getKeys().isEmpty());
}
Also used : GetJwksParams(io.jans.ca.common.params.GetJwksParams) GetJwksResponse(io.jans.ca.common.response.GetJwksResponse) ClientInterface(io.jans.ca.client.ClientInterface) Parameters(org.testng.annotations.Parameters) Test(org.testng.annotations.Test)

Aggregations

ClientInterface (io.jans.ca.client.ClientInterface)2 GetJwksParams (io.jans.ca.common.params.GetJwksParams)2 GetJwksResponse (io.jans.ca.common.response.GetJwksResponse)2 Parameters (org.testng.annotations.Parameters)2 Test (org.testng.annotations.Test)2