问题
I intend building an application using CodeIgniter so I'm currently identifying all the features I want. I would like to know if there are any recommendations for Authentication & Authorization libraries for CodeIgniter.
回答1:
I think QuickAuth is the best one.
But there is one good list in: http://codeigniter.com/wiki/Category:Contributions::Libraries::Authentication/
回答2:
Honestly, I've used several of them, and always end up rolling my own. Nothing every seems to do exactly what I want.
If you are in desperate need of a good auth_lib and don't want to roll your own, I'd suggest http://codeigniter.com/forums/viewthread/112654/
回答3:
There are only a few active user authentication systems in CodeIgniter, the most used of which is Ion Auth which picked up where Redux Auth BETA 2 left off a year or two ago.
I have used it on a large number of projects and it can be flexible enough for most needs. It's compatible with CI 2.0, incredibly lightweight and all bugs are fixed within a few hours or days too.
Others are Tank Auth and DX Auth.
I'd strongly advise against using the library Zack suggested. Adam is a great programmer but the whole logic behind that library is fubar and as far as I know not even he has used this library to create any actual websites.
Ion Auth is in place on several sites serving thousands of logins a day and running smooth. :)
回答4:
Have a look at http://bambooinvoice.org, he is using Site_sentry library for authentication, but if you want more security you can use storing sessions in the database.
回答5:
Ion Auth is currently one of the more attractive options. It's lean, widely used, actively maintained and has a good feature set.
回答6:
From this more recently updated question: How should I choose an authentication library for CodeIgniter? ,the best is Tank Auth.
回答7:
First it should be noted that authorization is not equivalent to authentication - as these terms and their definitions are frequently confused. Authorization != Authentication
Other answers gave a lot of different authentication libraries, so I skip that.
Great resource of general knowledge about Authorization e.g. Access Control
http://owasp.org/index.php/Access_Control_Cheat_Sheet
Codeigniter Authorization library
https://code.google.com/p/ar-acl/
This for sure is not the best authorization library for CI. I have not even used it. It is merely a Google search engine opinion ;) Seems to be quite simple and not very scalable. It does not even use database for storing different roles. So I do not reccommend it.
I believe 'best' is matter of opinion and purpose. My own opinion is that you should decide by your application needs. There is always an option to make one of your own, designed specifically by the needs of your application.
来源:https://stackoverflow.com/questions/1252079/what-is-the-best-authentication-and-authorization-library-for-codeigniter