AuthorizationChecker
in package
Determines if authorization is successful for a given Routable.
Table of Contents
Methods
- __construct() : mixed
- check() : RoutableInterface|ResponseInterface
- Returns Routable when authorization is successful and an Unauthorized HTTP response when it is not.
Methods
__construct()
public
__construct(RoutableResolverInterface $routableResolver, RequestHandlerInterface $unauthHandler) : mixed
Parameters
- $routableResolver : RoutableResolverInterface
- $unauthHandler : RequestHandlerInterface
Return values
mixed —check()
Returns Routable when authorization is successful and an Unauthorized HTTP response when it is not.
public
check(RoutableInterface $routable, ServerRequestInterface $request) : RoutableInterface|ResponseInterface
Parameters
- $routable : RoutableInterface
- $request : ServerRequestInterface