Session ID in query string


#1

Hi !

I’m working on an OpenLaszlo interface to a Rails application.
OpenLaszlo does not use the browser to query the server, so I can
forget about cookies.

Instead, I am passing the cookie name and value in the query parameters:
http://server/application.lzx?authName=_session_id&authValue=<session_id>

In turn, OpenLaszlo queries the server like this:
http://server/contacts/list_xml?_session_id=<session_id>

In ApplicationController, I created a new before_filter whose
responsibility it is to restore the session as specified in the query
parameters.

I can’t find a method to load a specific session from the session
store. Looking at CGI::Session, it looks I should be calling #new,
something like this:
self.session = CGI::Session.new(self.request,
:session_key => ‘_session_id’, :new_session => false) if
params[:_session_id]

Unfortunately, that doesn’t seem to work… I don’t get my original
session.

Anybody’s done something similar ?

Thanks !