Setting the cookie domain name using mod_python's Cookie class

"L.Guruprasad" <[email protected]> Tue, 02 Mar 2010 20:06:07 +0530
Newsgroups gmane.comp.python.mod_python
Message-ID <[email protected]>
Hi all,
Is it possible to set the domain for which a cookie is valid using
mod_python's Cookie class? I need to know about this because I want to
share cookies between 2 subdomains of a common superdomain.

This is how my workflow goes:

Login into Web app1 -> Authenticates and sets cookie for
subdomain1.domain.com.

Open Web app2 -> Check for session cookie, if it isn't there, redirect
to web app1 with referring_url set to web-app2 domain. Web app1, checks
for cookie in the browser which will be there if the user has logged in.
It takes the session id and sees if user of that session id has
privilege for app2 and if it is true, it sets cookie for
subdomain2.domain.com and redirects to the initially set referrer_url.

Is this possible with mod_python?

Regards,
Guruprasad