users@jersey.java.net

Re: [Jersey] Fw: Cookies and OpenSSO

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Mon, 31 Aug 2009 11:14:12 +0200

Hi Ronak,

Is this causing interop issues?

Cookie and NewCookie conform to RFC 2109, see here:

   http://www.ietf.org/rfc/rfc2109.txt

Section 4.4:

    Cookie: $Version="1"; Customer="WILE_E_COYOTE";
            $Path="/acme"

By default the version Cookie is set to 1 as per RFC 2109 (see section
4.2.):

    Version=version
       Required. The Version attribute, a decimal integer, identifies
to
       which version of the state management specification the cookie
       conforms. For this specification, Version=1 applies.
Paul.

On Aug 29, 2009, at 4:48 AM, Ronak Patel wrote:

> Hi All,
>
> I've been trying to use JAX-RS Jersey 1.0.3.1 to contact the OpenSSO
> Identity Services. It requires me to set a Cookie in my request HTTP
> message and I do that using the following code:
>
> final WebResource blogResource = client.resource("http://localhost:30080/opensso/identity/isTokenValid
> ");
>
> Cookie cookie = new Cookie("iPlanetDirectoryPro", value);
> System.out.println(cookie);
> final ClientResponse blogResponse =
> blogResource.cookie(cookie).get(ClientResponse.class);
>
> final String blog = blogResponse.getEntity(String.class);
> System.out.println(blog);
>
> Cookie:
> $
> Version
> =
> 1;iPlanetDirectoryPro=AQIC5wM2LY4SfczP6pR89eFKDhG7GQntIdyPNwAo1anO65k
> %3D%40AAJTSQACMDE%3D%23%0A
>
> What I always see is that the cookie outputs a $Version=1 as part of
> the cookie. I'm thinking this is incorrect since I've never seen
> anything like this in any of the other cookies sent on the net....is
> that true?
>
> Ronak Patel
>
>
>
>