Current path: home/webdevt/cryptoimpot.fr/module/Application/src/Middleware/
?? Go up: /home/webdevt/cryptoimpot.fr/module/Application/src
<?php
namespace Application\Middleware;
use Symfony\Component\VarDumper\VarDumper;
use Laminas\Authentication\AuthenticationService;
use Laminas\Http\PhpEnvironment\Response;
use Laminas\Permissions\Acl\Acl;
use Laminas\Router\RouteMatch;
class AuthorizationMiddleware
{
private $authService ;
private $acl;
private $response;
private $baseUrl;
/**
* AuthorizationMiddleware constructor.
* @param AuthenticationService $authService
* @param Acl $acl
* @param Response $response
* @param $baseUrl
*/
public function __construct(AuthenticationService $authService, Acl $acl, Response $response, $baseUrl)
{
$this->authService = $authService;
$this->acl = $acl;
$this->response = $response;
$this->baseUrl = $baseUrl;
}
public function checkProtectedRoutes(RouteMatch $match)
{
if (! $match) {
// Nothing without a route
return null ;
}
// Do your checks...
}
}