]> BookStack Code Mirror - bookstack/commit
Simplify ApiAuthException control flow 4320/head
authorThomas Kuschan <redacted>
Wed, 14 Jun 2023 09:52:22 +0000 (11:52 +0200)
committerThomas Kuschan <redacted>
Fri, 16 Jun 2023 08:00:02 +0000 (10:00 +0200)
commit74097bd47c050cd3ddd1c3ccf7eef3a20bc463a3
tree5df6f060f0900ae62e0734e36a526ccc09877bd0
parentec775aec02c0887d5cf2dc23c938a75b7eaf67d2
Simplify ApiAuthException control flow

Remove unnecessary UnauthorizedException
and make ApiAuthException compatible with HttpExceptionInterface.

Move the creation of a rsponse for the exception
from ApiAuthenticate middleware into the application exception handler.
app/Exceptions/ApiAuthException.php
app/Exceptions/UnauthorizedException.php [deleted file]
app/Http/Middleware/ApiAuthenticate.php