maymeow / cakephp-identity
This package is abandoned and no longer maintained.
No replacement package was suggested.
Identity plugin for CakePHP
Package info
github.com/MayMeow/cakephp-identity
Type:cakephp-plugin
pkg:composer/maymeow/cakephp-identity
v1.1
2019-04-16 14:14 UTC
Requires
- cakephp/cakephp: ^3.5
Requires (Dev)
- phpunit/phpunit: ^5.7.14|^6.0
This package is auto-updated.
Last update: 2020-05-31 12:58:49 UTC
README
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require maymeow/cakephp-identity
Configuration
Load plugin in Application.php with
$this->addPlugin('Identity', ['bootstrap' => false, 'routes' => true]);
Add to AppController.php following code
$this->loadComponent('Auth', [ //'authorize'=> 'Controller', 'authenticate' => [ 'Form' => [ 'userModel' => 'Identity.Users', // use this to change default auth model 'fields' => [ 'username' => 'email', 'password' => 'password' ] ] ], 'loginAction' => [ 'controller' => 'Users', 'action' => 'login', 'plugin' => 'Identity', 'prefix' => false ], // If unauthorized, return them to page they were just on 'unauthorizedRedirect' => $this->referer() ]); $this->Auth->deny();