Decoding Rack::Session::Cookie info from within an EventMachine wrapped around a Sinatra app.

74 views
Skip to first unread message

Dave Sag

unread,
May 2, 2013, 11:19:00 PM5/2/13
to sina...@googlegroups.com
I am building a multi-player game using EventMachine's websockets and Sinatra.

See this gist for the skeleton of how this is put together. https://gist.github.com/davesag/5506864

In the Websocket's onopen method I can access the encrypted cookie that is established by Sinatra using Rack::Session::Cookie but I am being thwarted trying to decode it.  Nothing I've tried so far works.

I have posted the question in more detail to Stackoverflow and attached a 100 rep bounty to the question to make it more attractive. See http://stackoverflow.com/questions/16312024/how-to-decode-a-cookie-from-the-header-of-a-websocket-connection-handshake-rub

I also opened an issue with the Rack project in GitHub - see https://github.com/rack/rack/issues/551

Here's hoping someone on the Sinatra list can help me out here.

Cheers

Dave


Reply all
Reply to author
Forward
0 new messages