@@ -32,18 +32,22 @@ |
||
| 32 | 32 | ServerRequestInterface $request, |
| 33 | 33 | RequestHandlerInterface $handler |
| 34 | 34 | ): ResponseInterface { |
| 35 | - if ($request->getUri()->getPath() !== $this->authorizationPath) { |
|
| 35 | + if ($request->getUri()->getPath() !== $this->authorizationPath) |
|
| 36 | + { |
|
| 36 | 37 | return $handler->handle($request); |
| 37 | 38 | } |
| 38 | 39 | |
| 39 | - if ($this->broadcast instanceof GuardInterface) { |
|
| 40 | + if ($this->broadcast instanceof GuardInterface) |
|
| 41 | + { |
|
| 40 | 42 | $status = $this->broadcast->authorize($request); |
| 41 | 43 | |
| 42 | - if ($status->hasResponse()) { |
|
| 44 | + if ($status->hasResponse()) |
|
| 45 | + { |
|
| 43 | 46 | return $status->getResponse(); |
| 44 | 47 | } |
| 45 | 48 | |
| 46 | - if (!$status->isSuccessful()) { |
|
| 49 | + if (!$status->isSuccessful()) |
|
| 50 | + { |
|
| 47 | 51 | return $this->responseFactory->createResponse(403); |
| 48 | 52 | } |
| 49 | 53 | } |