开发者

How do I authenticate a Flex session with Rails?

I have a Flex UI that will need to connect to Rails. How do I manage authentication and only authenticated user's can connect and see the开发者_高级运维ir own data only? UPDATE: And how would I do this if I should not want to use RubyAMF (right or wrong)?


I would say auth_logic might be a better plugin for handling authentication. If you use RubyAMF with auth_logic you will make a call to UserSession.create and pass in the username and password. You may also want to check out Weborb for communicating with Flex, it uses RTMP and depending on your needs it may be a better fit.


Check out RubyAMF, it is super easy to set up and use and enables you to call controller methods directly from flash and return actionscript objects.

homepage: http://blog.rubyamf.org/
google code: http://code.google.com/p/rubyamf/


First, for RubyAMF, check out this link: http://unitedmindset.com/jonbcampos/2009/05/30/ruby-on-rails-with-flex/

Next, for the authenticated users, just use Restful Authentication, a ruby plugin: http://techno-weenie.net/2006/8/1/restful-authentication-plugin

If you make the smallest change to the authentication failed function in the plugin, your app with throw fault events when a user tries to access a service that they aren't authenticated to access.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜