add basic authentication with user, password and api key

This commit is contained in:
2026-07-17 16:05:28 +02:00
parent d90c5887fc
commit 956aff9fe3
4 changed files with 37 additions and 9 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ if (strpos($request->path(), '/api/') === 0) {
$authenticator->authenticate($request);
} catch (\Throwable $e) {
$logger->warning('External API auth failed', ['path' => $request->path(), 'error' => $e->getMessage()]);
$response->json(['error' => 'Unauthorized'], 401);
$response->unauthorized();
}
}