use of org.apache.archiva.redback.rest.api.services.UserService in project archiva by apache.
the class AbstractDownloadTest method getUserService.
protected UserService getUserService(String authzHeader) {
UserService service = JAXRSClientFactory.create("http://localhost:" + port + "/" + getRestServicesPath() + "/redbackServices/", UserService.class, Collections.singletonList(new JacksonJaxbJsonProvider()));
WebClient.client(service).header("Referer", "http://localhost:" + port);
// for debuging purpose
WebClient.getConfig(service).getHttpConduit().getClient().setReceiveTimeout(3000000L);
if (authzHeader != null) {
WebClient.client(service).header("Authorization", authzHeader);
}
return service;
}
Aggregations