Skip to content

Commit 13ee0ae

Browse files
committed
Check explicitly for an instance of UserInterface
1 parent d92c987 commit 13ee0ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/AuthorizationMiddleware.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(AuthorizationInterface $authorization, ResponseInter
3939
public function process(ServerRequestInterface $request, HandlerInterface $handler)
4040
{
4141
$user = $request->getAttribute(UserInterface::class, false);
42-
if (false === $user) {
42+
if (! $user instanceof UserInterface) {
4343
return $this->responsePrototype->withStatus(401);
4444
}
4545

0 commit comments

Comments
 (0)