dotkernel / dot-controller-plugin-authorization
DotKernel authorization controller plugin
Installs: 1 544
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: ^7.2
- dotkernel/dot-authorization: ^2.0
- dotkernel/dot-controller: ^2.0
- laminas/laminas-dependency-plugin: ^1.0
- laminas/laminas-servicemanager: ^3.3
Requires (Dev)
- phpunit/phpunit: ^4.8
- squizlabs/php_codesniffer: ^2.3
README
Authorization controller plugin
NOTE
dot-controller-plugin-authorization is archived and will receive no further development!
Installation
Run the following command
$ composer require dotkernel/dot-controller-plugin-authorization
This will also install packages dotkernel/dot-controller
and dotkernel/dot-authorization
as dependencies.
Next, enable the module by merging the ConfigProvider
to your application's configuration.
Usage
In any controller, you can access this plugin by calling
$this->authorization()->...
This plugin defines one method, as a proxy to the registered authorization service
$this->authorization()->isGranted($permission, array $roles = [], $context = null);