mirror of
https://github.com/grocy/grocy.git
synced 2026-04-03 19:36:16 +02:00
handle responses returned by authenticate in AuthMiddleware
This commit is contained in:
parent
e01e0f3abe
commit
1616b41ea9
|
|
@ -67,6 +67,10 @@ abstract class AuthMiddleware extends BaseMiddleware
|
||||||
return $response->withStatus(302)->withHeader('Location', $this->AppContainer->get('UrlManager')->ConstructUrl('/login'));
|
return $response->withStatus(302)->withHeader('Location', $this->AppContainer->get('UrlManager')->ConstructUrl('/login'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if ($user instanceof Response)
|
||||||
|
{
|
||||||
|
return $user;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
define('GROCY_AUTHENTICATED', true);
|
define('GROCY_AUTHENTICATED', true);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user