use of io.jans.scim.ws.rs.scim2.IUserWebService in project jans by JanssenProject.
the class SampleTest method smallerClient.
// This tests assumes client_secret_basic for token endpoint authentication
@Test
@Parameters({ "domainURL", "OIDCMetadataUrl", "clientId", "clientSecret" })
public void smallerClient(String domainURL, String OIDCMetadataUrl, String clientId, String clientSecret) throws Exception {
IUserWebService myclient = ScimClientFactory.getClient(IUserWebService.class, domainURL, OIDCMetadataUrl, clientId, clientSecret, false);
SearchRequest sr = new SearchRequest();
sr.setFilter("userName eq \"admin\"");
Response response = myclient.searchUsersPost(sr);
assertEquals(response.getStatus(), OK.getStatusCode());
UserResource u = (UserResource) response.readEntity(ListResponse.class).getResources().get(0);
logger.debug("Hello {}!", u.getDisplayName());
}
Aggregations