开发者

Rails Authentication

Hey, i need some help with rails, again! Last it was about Authlogic.. Well I'm g开发者_运维技巧one a bit backward since.. I mean, Authlogic isn't a Authentcate system i like.. So now i wan't you guys to tell me what you think is the best!

I going to use it to a project of mine. Where there has to be a few roles like Admin, User and Guest.. So might you guys can tell me what is good and what is bad..?


You need to split authentication from authorization.

Authentication covers the login/logout process. Authorization is directly linked to permission to see/use resources.

Authlogic is a very good authentication gem.

For authorization you can check CanCan from Ryan Bates, which is very simple to integrate with authlogic (just a single file in the models folder called ability.rb in which you configure all the app authorizations).

EDIT: You can also go with a simpler solution but you will lose flexibility


I used Devise and it worked quite well, however it did not met my needs... What you might need however looks like something super simple, something like this: http://railscasts.com/episodes/21-super-simple-authentication


I use Authlogic for authentication and DocSavage's Rails Authorisation plug-in for authorisation needs. Its a simple yet powerful plug-in.

Rails authorisation plug-in: http://github.com/DocSavage/rails-authorization-plugin

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜