authorizationService->isAuthorized($request)) { return $this->responseFactory->createResponse(403); // Forbidden } } catch (MissingToken $exception) { $this->logger->alert($exception, ['request' => $request]); return $this->responseFactory->createResponse(401); // Unathorized } return $handler->handle($request); } }