Hi,
I am working on a site that uses a java webapp for its intensive computation and drupal for everything else.
I would like the java app to directly use the drupal Session Cookies in order to figure out who it is talking to.
The session cookie on one of my drupal requests looks like this
SESScfc90a62c81b7bfc6f292320b1d0b8ca=228d8c6ad449f64c0c15232d9cc9d33c; SESSf8b241809c7e71444249cbbf54eb50b9=b1c94e23db7601b821e99e989bd41704; has_js=1
I was hoping that this would directly map to the 'sid' column in the sessions table in the drupal db, then I could easily look up the user information within Java by simply querying a few tables in drupaldb.
But none of the sids in the database match the session cookie.
Should this lookup be possible? Any ideas?
Thanks alot
Ben.
Comments
Any luck?
Did you ever have any luck with this? I am using a similar idea but using IP address to determine login status but this seems to be more secure (using the sid that is). Any help would be appreciated, thanks!
-Drew
+1 need help with this too.
+1 need help with this too.
+1
+1
Solution
I was also investigating this for use with authentication against a webservice. The cookie has this form:
SESS{hexid}={hexid} e.g. SESScfc90a62c81b7bfc6f292320b1d0b8ca=228d8c6ad449f64c0c15232d9cc9d33c
The value after the = is what is stored in the sid field of the session table.
So for the given example, "SESScfc90a62c81b7bfc6f292320b1d0b8ca=228d8c6ad449f64c0c15232d9cc9d33c",
the value "228d8c6ad449f64c0c15232d9cc9d33c" would be what is stored inside the sid field of the session table.
edit:
For php, the value after the = is what is returned by the PHP function session_id(). Review the PHP docs for more information.
Session
Session Share
http://drupal.org/sandbox/rogical/1903268 I'm going to make it in this module.
It would use iframe to share sessions, so far it needs a good way to put the place of the iframe, ideas are welcome.
Drupal Solution Architect