Forum: Ruby on Rails Session ID in query string

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
francois.beausoleil (Guest)
on 2005-12-02 18:41
(Received via mailing list)
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...

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

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 !
This topic is locked and can not be replied to.