开发者

Utilizing A Devise Session Through Flex With Rails3-AMF

I have a Flex front end and a Rails 3 back-end that I would like to establish a session to. Before you can access the page embedded with the flex front-end, you are prompted with a html login page through Devise.

I am able to login fine through the html page but cannot get access to the session with Flex using amf requests.

I have the rails session token in flex but cannot pass them into rails cor开发者_如何学Gorectly. I am attempting to pass the sessiontokin in through a "send" service call like

somethingService.new.send(session_id: '###', _csrf_token: '###' )

and rails is receiving the session param in a hash as like

{0=>{"session_id"=>'###')}} 

instead of like

{"session_id"=>'###')}.

Any suggestions on how to fix this issue or to utilize a session with Flex/RubyAmf/Rails are welcomed.

Thx.


It's been a while since I've done anything with integrating flex & rails, but I have a vague memory that the params come through as {0 => params} if not explicitly mapped in the configuration. The rails3-amf readme on github uses this example:

config.rails3amf.map_params :controller => 'UserController', :action => 'getUser', :params => [:session_id]

If your not already, perhaps explicitly defining the session_id in the :params would make the difference?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜