add basic authentication with user, password and api key

This commit is contained in:
pierpaolo.mammi committed 2026-07-17 16:05:28 +02:00
1 parent d90c5887fc
commit 956aff9fe3
4 files changed
+37 -9

No files matched your search

+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();
}
}