use of io.jans.ca.common.response.GetDiscoveryResponse in project jans by JanssenProject.
the class GetDiscoveryTest method test.
@Parameters({ "host", "opHost", "opDiscoveryPath" })
@Test
public void test(String host, String opHost, String opDiscoveryPath) {
ClientInterface client = Tester.newClient(host);
final GetDiscoveryParams commandParams = new GetDiscoveryParams();
commandParams.setOpHost(opHost);
commandParams.setOpDiscoveryPath(opDiscoveryPath);
final GetDiscoveryResponse resp = client.getDiscovery(commandParams);
assertNotNull(resp);
assertNotNull(resp.getIssuer());
}
use of io.jans.ca.common.response.GetDiscoveryResponse in project jans by JanssenProject.
the class GetDiscoveryOperation method execute.
public IOpResponse execute(GetDiscoveryParams params) {
OpenIdConfigurationResponse discoveryResponse = getDiscoveryService().getConnectDiscoveryResponse(params.getOpConfigurationEndpoint(), params.getOpHost(), params.getOpDiscoveryPath());
GetDiscoveryResponse response = new GetDiscoveryResponse();
try {
BeanUtils.copyProperties(response, discoveryResponse);
return response;
} catch (IllegalAccessException | InvocationTargetException e) {
LOG.error("Error in creating op discovery configuration response ", e);
}
throw new HttpException(ErrorResponseCode.FAILED_TO_GET_DISCOVERY);
}
use of io.jans.ca.common.response.GetDiscoveryResponse in project jans by JanssenProject.
the class GetDiscoveryTest method test_withOpConfigurationEndpoint.
@Parameters({ "host", "opConfigurationEndpoint" })
@Test
public void test_withOpConfigurationEndpoint(String host, String opConfigurationEndpoint) {
ClientInterface client = Tester.newClient(host);
final GetDiscoveryParams commandParams = new GetDiscoveryParams();
commandParams.setOpConfigurationEndpoint(opConfigurationEndpoint);
final GetDiscoveryResponse resp = client.getDiscovery(commandParams);
assertNotNull(resp);
assertNotNull(resp.getIssuer());
}
Aggregations