handle responses returned by authenticate in AuthMiddleware

This commit is contained in:
Benjamin Böhmke 2024-03-04 19:41:59 +01:00
parent e01e0f3abe
commit 1616b41ea9

View File

@ -67,6 +67,10 @@ abstract class AuthMiddleware extends BaseMiddleware
return $response->withStatus(302)->withHeader('Location', $this->AppContainer->get('UrlManager')->ConstructUrl('/login'));
}
}
else if ($user instanceof Response)
{
return $user;
}
else
{
define('GROCY_AUTHENTICATED', true);