dotkernel/dot-controller-plugin-authorization

DotKernel authorization controller plugin

2.9.2 2024-03-25 13:49 UTC

This package is auto-updated.

Last update: 2024-03-25 16:57:59 UTC


README

Caution

Security-Only Maintenance Mode

This package is considered feature-complete, and is now in security-only maintenance mode.

dot-controller-plugin-authorization

Authorization controller plugin

OSS Lifecycle GitHub license PHP from Packagist (specify version)

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);