Ehud Rosenberg
2009-Mar-02 08:13 UTC
How can I load a session from the cookie store manually?
Hi all, I''m trying to achieve something a bit unusual - I want to use a session_id I have to retrieve the session object from the CookieStore. Obviously, Rails does it somehow but I couldn''t figure out how. Can anyone shed some light? Thanks ;) -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Priya Buvan
2009-Mar-02 08:47 UTC
Re: How can I load a session from the cookie store manually?
Ehud Rosenberg wrote:> Hi all, > I''m trying to achieve something a bit unusual - I want to use a > session_id I have to retrieve the session object from the CookieStore. > Obviously, Rails does it somehow but I couldn''t figure out how. Can > anyone shed some light? > > Thanks ;)Just mention session[:column_name] -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ehud Rosenberg
2009-Mar-02 08:48 UTC
Re: How can I load a session from the cookie store manually?
Priya Buvan wrote:> Ehud Rosenberg wrote: >> Hi all, >> I''m trying to achieve something a bit unusual - I want to use a >> session_id I have to retrieve the session object from the CookieStore. >> Obviously, Rails does it somehow but I couldn''t figure out how. Can >> anyone shed some light? >> >> Thanks ;) > > Just mention > > session[:column_name]Thanks, but that''s not what I mean... I want to use a session key i have to retrieve the session object (the one you mentioned) manually from the CookieStore. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Andrius Chamentauskas
2009-Mar-02 13:58 UTC
Re: How can I load a session from the cookie store manually?
This should help you do that http://dev.rubyonrails.org/browser/trunk/actionpack/lib/action_controller/session/cookie_store.rb Basically cookie consists of two parts. First is session data base 64 encoded and then url encoded, second is SHA1 hash of session data and secret server side password. On Mar 2, 10:48 am, Ehud Rosenberg <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Priya Buvan wrote: > > Ehud Rosenberg wrote: > >> Hi all, > >> I''m trying to achieve something a bit unusual - I want to use a > >> session_id I have to retrieve the session object from the CookieStore. > >> Obviously, Rails does it somehow but I couldn''t figure out how. Can > >> anyone shed some light? > > >> Thanks ;) > > > Just mention > > > session[:column_name] > > Thanks, but that''s not what I mean... I want to use a session key i have > to retrieve the session object (the one you mentioned) manually from the > CookieStore. > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---