Download the PHP package marcelbonnet/slim-auth without Composer
On this page you can find all versions of the php package marcelbonnet/slim-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download marcelbonnet/slim-auth
More information about marcelbonnet/slim-auth
Files in marcelbonnet/slim-auth
Package slim-auth
Short Description Authorization and authentication for the Slim Framework using ZF2 Authentication and Acl components
License MIT
Homepage https://github.com/marcelbonnet/slim-auth
Informations about the package slim-auth
Slim Framework Authentication and Authorization Middleware
This project uses parts of Zend Framework, like Zend Auth classes, Zend ACL and Zend config.
My goal was to build a reusable Middleware to authenticate through LDAP and/or RDBMS.
Install
Bundled Mechanism
- Authentication through LDAP (see sample config for LDAP and AD)
- Authentication through RDBMS
- Authorization based on user roles kept in a RDBMS' table.
RDBMS Mechanism
Agnostic table design. The only thing slim-auth needs to know is where users and roles are stored , using an instance of Doctrine ORM's EntityManager.
Requirements
- Slim Framework v. 3.x
- PHP >= 5.6
- Doctrine ORM >= 2.5
To see all dependencies: https://packagist.org/packages/marcelbonnet/slim-auth
How To (slim-auth min version 2.0.0)
1.x not compatible.
Dao
This package suppose you have a User Role(s). Here an example design (use whatever attribute names you want):
index.php
Now your ACL class should look like:
How it looks in MySQL
History
This project started as a modified version of a development branch from jeremykendall/slim-auth.
All versions of slim-auth with dependencies
zendframework/zend-authentication Version 2.*
zendframework/zend-permissions-acl Version 2.*
zendframework/zend-session Version 2.*
zendframework/zend-config Version ^2.6.0
zendframework/zend-ldap Version ^2.7.1
doctrine/orm Version ^2.5