NOTE: It's still in development mode, do not use in production yet!
It is developed for CakePHP min. 4.3.
You can install plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require kicaj/auth dev-master
Load the Plugin in your bootstrap.php or /src/Application.php:
$this->addPlugin('Auth');
Load the Component in your AppController.php:
public function initialize()
{
parent::initialize();
// ...
$this->loadComponent('Auth.Authentication');
// ...
}
Nextly, you should set authorization action list for each controller by auth
property, like below:
public $auth = [
'admin' => [
'add',
'edit',
'delete',
],
'*' => [
'view'
],
];
If you want load default user and group data, just run command below:
cake bake migrations seed -p Auth