Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Easiest drop-in PHP authentication solution?

Forgive me if this has already been asked (and feel free to provide a reference and close this).

The ultimate goal is to associate some data with each user (obviously) and display that data to users differently based on their roles.

I have looked extensively for a simple, drop-in solution for authenticating users in PHP.

I am not looking for:

  • A CMS with authentication
  • A PHP MVC Framework

This project is too simple for both, and while it should go to production eventually, will be performed by novice programmers. I want to be teaching them PHP, not specifics for a CMS or a framework. I am not completely opposed to the idea of a framework, but all the frameworks I have looked at enforce MVC and that is too advanced a concept at this point.

I am looking for something that will allow me to easily register users, login users, and put users into roles. Ideally, this means having a library that will handle the database & encryption logic and provide me with a simple API to do the above. I prefer to provide the library with a database and let it do its thing without any interaction from me - storing data in the session is also preferable but not required.

I know I could easily do this myself, but I want to make things simple for those I am teaching. A library/component/etc is what I want for this. I've been all over PEAR, and the modules there seem overly complicated. The two authentication providers given in the PHP5 documentation seem unclear to me. Examples of those in action, if they do what I've described, would work. Any ideas?

like image 874
JoshJordan Avatar asked May 28 '09 17:05

JoshJordan


1 Answers

Login Sessions

It's a little out-dated, but still comes with great concepts.

like image 161
Corey Hart Avatar answered Oct 24 '22 09:10

Corey Hart