Search in sources :

Example 1 with UserService

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;
}
Also used : UserService(org.apache.archiva.redback.rest.api.services.UserService) JacksonJaxbJsonProvider(com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider)

Aggregations

JacksonJaxbJsonProvider (com.fasterxml.jackson.jaxrs.json.JacksonJaxbJsonProvider)1 UserService (org.apache.archiva.redback.rest.api.services.UserService)1