views:

188

answers:

1

G'day,

I am developing server application with Ruby on Rails and I'd like to store session token in each request's body. For example {"token":"asdkjahsdoahgfblkasblbag"}.

And I am stuck, really don't know how to configure authlogic to handle token from params, not via cookie. And how to prevent "set-cookie" header sending?

Thanks, Alexandr

A: 

You can do that using the module Authlogic::Session. This module is responsible for authenticating the user via params.

Please check: http://github.com/binarylogic/authlogic/blob/master/lib/authlogic/session/params.rb

sam
Thanks for your reply, Syed!Unfortunately, I can't get it working.Following is correct method to set params_key? No additional options needed?class UserSession < Authlogic::Session::Base params_key :tokenend
Alexandr Borisov