Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Slim Framework authentication

Tags:

php

slim

I searched for a good time on Google for a Authentication lib for Slim framework but all that came up was single user based authentication with BasicHttpAuth. What are my alternatives here apart from implementing my own auth.

Apart from hashing passwords, I'm not very good with sessions well I know how to work with them but keeping sessions secure is another thing.

like image 712
Sterling Duchess Avatar asked Dec 18 '13 20:12

Sterling Duchess


1 Answers

I'm currently writing a library to handle that now, but it's in early alpha not yet ready for use. In the meantime, you can refer to this project as an example: https://github.com/jeremykendall/flaming-archer.

Pay special attention to the login route, the Auth DbAdapter, and the Auth middleware.

It uses an array of URIs to secure certain routes, in this case just the admin group of routes.

like image 106
Jeremy Kendall Avatar answered Oct 18 '22 16:10

Jeremy Kendall