users@jersey.java.net

Re: [Jersey] Jersey Client and Authentication

From: Denis <deniak.nospam_at_gmail.com>
Date: Tue, 17 Mar 2009 18:26:52 +0100

Ok, thanks for all your replies.
I'm going to use the Apache client to handle the authentication on the
client side and a jersey filter which decode and analyze the header.

Regards,

Denis


On Tue, Mar 17, 2009 at 6:14 PM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:

>
> On Mar 17, 2009, at 6:09 PM, Steve Sims wrote:
>
> Sorry, missed off the server side of things - I know that on Glassfish,
>> container security handles Basic authentication just through configuration
>> of web.xml (see
>> http://weblogs.java.net/blog/mhadley/archive/2008/03/authentication.html
>> ).
>>
>
> Yes.
>
> I'm not sure about the server included with Jersey however.
>>
>>
> Jersey does not include a server. It does have support for multiple types
> of server. You can use any compliant Web container (like GF or Tomcat) or
> Grizzly, or the LW HTTP server, or to come soon the Simple HTTP support. I
> would recommend using a Web container if you want to use security features
> below that of Jersey.
>
> The other solution is to utilize a Jersey filter to perform the
> authentication.
>
> The Atom server sample [1] contains an example of this approach in addition
> to using roles.
>
>
> http://download.java.net/maven/2/com/sun/jersey/samples/atompub-contacts-server/1.0.2/atompub-contacts-server-1.0.2-project.zip
>
> Paul.
>
>
> Cheers,
>>
>> Steve
>>
>> Steve Sims wrote:
>>
>>> Hi Denis,
>>> If you use the latest release of Jersey (1.0.2) then the Apache client
>>> based Client handles it much more smoothly. See
>>> https://jersey.dev.java.net/servlets/ReadMsg?listName=users&msgNo=4165 for
>>> Paul's test case which shows various configurations of it.
>>> Cheers,
>>> Steve
>>> Denis wrote:
>>>
>>>> Hi,
>>>>
>>>> I would like to add an authentication method (basic, digest...) using
>>>> the jersey client/server.
>>>> I was thinking of adding the specific authentication header and add a
>>>> filter to check that header on
>>>> the server side.
>>>> Do you know if there's a better way to manage it?
>>>>
>>>> Denis
>>>>
>>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>