Session lookup and takeover
Hello, fellow Dancers! I'm working on a XML-RPC API similar to Magento's for my Perl based cart Nitesi. The first request to the API is a login, which is checked by my account management. The user id, email and other account information is saved to the session and the session id is returned by the API response. On subsequent requests the session id is provided as token so the API backend knows that the request is authenticated. So how can I retrieve a session by session id and use it as current session? Any kind of feedback would be helpful :-). Regards Racke -- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team
Saving using "session id => { %data }" isn't what you're looking for? I'm not sure I understand what you're trying to do... On Fri, Jun 29, 2012 at 4:19 PM, Stefan Hornburg (Racke) <racke@linuxia.de>wrote:
Hello, fellow Dancers!
I'm working on a XML-RPC API similar to Magento's for my Perl based cart Nitesi.
The first request to the API is a login, which is checked by my account management. The user id, email and other account information is saved to the session and the session id is returned by the API response.
On subsequent requests the session id is provided as token so the API backend knows that the request is authenticated.
So how can I retrieve a session by session id and use it as current session?
Any kind of feedback would be helpful :-).
Regards Racke
-- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team
______________________________**_________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/**cgi-bin/listinfo/dancer-users<http://www.backup-manager.org/cgi-bin/listinfo/dancer-users>
On 07/03/2012 09:10 AM, sawyer x wrote:
Saving using "session id => { %data }" isn't what you're looking for?
I'm not sure I understand what you're trying to do...
Actually it is very simple to achieve, just do: # fake cookie my $session_name = config->{session_name} || 'dancer.session'; cookie $session_name => $session_id; Regards Racke -- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team
participants (2)
-
sawyer x -
Stefan Hornburg (Racke)