Have a look here for example:
https://github.com/apache/cxf/blob/master/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/security/JAXRS20HttpsBookTest.java
there should be some examples available on the web too
Sergey
On 05/04/17 23:16, KARR, DAVID wrote:
-----Original Message-----
From: Sergey Beryozkin [mailto:[email protected]]
Sent: Wednesday, April 05, 2017 3:09 PM
To: [email protected]
Subject: Re: Verifying threadsafety of cached javax.ws.rs.client.Client
implementation with basic auth in CXF & 404 in docs
That should be thread safe too, I don't see why not...
Ok, well, thanks for that, but the harder question is HOW to do client
certificate auth with ClientBuilder?
Sergey
On 05/04/17 23:07, KARR, DAVID wrote:
-----Original Message-----
From: KARR, DAVID
Sent: Wednesday, April 05, 2017 12:27 PM
To: [email protected]
Subject: Verifying threadsafety of cached javax.ws.rs.client.Client
implementation with basic auth in CXF & 404 in docs
I'm likely going to be implementing a REST service call using
ClientBuilder, and it will require basic auth. I'm intending to
cache the Client object, if I can be sure it's thread-safe.
Slight correction: this is going to require 2-way cert auth, not basic
auth.
I'm having trouble getting a clear picture on some of these details
from the main docs. I found the section about using ClientBuilder
(https://urldefense.proofpoint.com/v2/url?u=http-
3A__cxf.apache.org_docs_jax-2Drs-2Dclient-2Dapi.html&d=DwIFAg&c=LFYZ-
o9_HUMeMTSQicvjIg&r=OsTemSXEn-
xy2uk0vYF_EA&m=yD0wxSnRASYOtn5y9X8bW4S5ob5E8WHX2C84AFt4ATQ&s=bIClm6sf
aNO KqAtPUKTW6E-mJyd8zEp3DdstKS98Hbg&e= ), but that doesn't mention
auth.
When I searched for "basic" on the same page, I found some references
to doing this with a WebClient, but I'm not sure of the relevance of
that.
I also can't find a statement about thread-safety. I understand that
Client is an interface, but CXF is providing an implementation, so I
would assume it's possible to determine that.
I note that links to "JAXRSClientFactoryBean" on that page get a 404.
I have a feeling that class is relevant to this. I also don't see
this class in the standard Javadoc set.
--
Sergey Beryozkin
Talend Community Coders
https://urldefense.proofpoint.com/v2/url?u=http-
3A__coders.talend.com_&d=DwIC-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=OsTemSXEn-
xy2uk0vYF_EA&m=QavMmIPqYG7WKowlS6MW2ICLH4yHKXk38iZAy2Wtv7Q&s=sLgiqB3V9Pc
9DwSFG6HrSMOkPw5bajVaLhAwSXm245Q&e=