users@jersey.java.net

Re: [Jersey] Basic Auth on the client side

From: Matthieu Riou <matthieu.riou_at_gmail.com>
Date: Wed, 28 Jan 2009 09:01:44 -0800

On Wed, Jan 28, 2009 at 8:44 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:

>
> On Jan 28, 2009, at 5:22 PM, Matthieu Riou wrote:
>
> Hi,
>>
>> I was wondering what were the options to do Basic Auth with the Jersey
>> client in 1.0.1. I've seen an e-mail thread dating back from November where
>> a patch had been proposed but it doesn't seem it's been integrated in 1.0.1
>> or maybe in a different form. I've been staring at the Javadoc for quite
>> some time but couldn't find anything that looked like auth methods.
>>
>>
> Currently the only way is to use the java.net.Authenticator [1] because by
> default HttpURLConnection is utilized. Which is not ideal because it is a
> static, per JVM, configuration.
>

Yes, it's not really usable.


>
> We are working on support using the Apache HTTP client where basic auth can
> be set up on a per client basis. I hope this can make the 1.0.2 release, i
> just need to work on the implementation to ensure it is thread safe.
>

So if I wanted to test it I could take the current source, apply the patch
for Apache http-client and give it a go?

Thanks,
Matthieu


>
> Paul.
>
> [1] http://java.sun.com/javase/6/docs/technotes/guides/net/http-auth.html
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>