src/AuthorizationInterface.php
<?php
/**
* This file is part of the mimmi20/mezzio-generic-authorization-rbac package.
*
* Copyright (c) 2020-2024, Thomas Mueller <mimmi20@live.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types = 1);
namespace Mimmi20\Mezzio\GenericAuthorization;
use Psr\Http\Message\ServerRequestInterface;
interface AuthorizationInterface
{
/**
* Check if a role is granted for a resource
*
* @throws void
*/
public function isGranted(
string | null $role = null,
string | null $resource = null,
string | null $privilege = null,
ServerRequestInterface | null $request = null,
): bool;
}