phpDocumentor

AuthMiddleware

Class AuthMiddleware

Table of Contents

$permissionService  : PermissionService
$url  : Url
$userPreferences  : UserPreferences
__construct()  : mixed
AuthMiddleware constructor.
__invoke()  : ResponseInterface
Middleware callback ensuring that a admin is logged in.
checkAdminPermission()  : bool
redirectToLoginResponse()  : Response
Creates a response that is redirecting the the shop store's login.php page.

Properties

Methods

__invoke()

Middleware callback ensuring that a admin is logged in.

public __invoke(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
$request : ServerRequestInterface
$handler : RequestHandlerInterface
Return values
ResponseInterface

checkAdminPermission()

private checkAdminPermission(int $userId, ServerRequestInterface $request) : bool
Parameters
$userId : int
$request : ServerRequestInterface
Return values
bool

redirectToLoginResponse()

Creates a response that is redirecting the the shop store's login.php page.

private redirectToLoginResponse(ServerRequestInterface $request) : Response
Parameters
$request : ServerRequestInterface
Return values
Response

Search results