Access cookies set by another application

P

prasannakate

We have two web applications A and B, user logins into application A
and we have implemented single sign on, so he also gets logged in to
application B.
Now we want to logout the user from application B, whenever he logs
out from application A.

We think deleting the JSESSION ID cookie set by application B will
solve the problem.
But we are not able to access the cookies set by B in A.

Does any one know how can I access the cookies set by another web
application in my web application. Both these applications are web
based and controlled by us.
 
T

Thomas 'PointedEars' Lahn

Does any one know how can I access the cookies set by another web
application in my web application. Both these applications are web
based and controlled by us.

Set the `domain' or `path' parameters of the cookie or the deletion request
accordingly, and make sure that protocols and `secure' flags match.

Given the correct parameters, matching protocols and `secure' flags, cookies
set for the domain `foo.bar' can be accessed/modified/deleted by a resource
accessed via the domains `foo.bar' or `baz.foo.bar'. Cookies set for the
path `/foo/bar' can be accessed/modified/deleted by a resource accessed via
the paths `/foo/bar' or `/foo/bar/baz'.

For example, a deletion request in `http://baz.foo.bar/' for the cookie
named `baz' that had been set for the domain `foo.bar':

document.cookie = "baz=42; domain=foo.bar; expires=" + (new Date(0));

The `domain' and `path' parameters of a cookie are set implicitly according
to the request URI of the document if you don't provide them.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top