feat: integrated OAuth2 server

This commit is contained in:
Björn Fromme
2025-04-24 20:28:27 +02:00
parent c418ae6399
commit adbfb49c11
84 changed files with 2542 additions and 312 deletions
+4 -2
View File
@@ -7,15 +7,17 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Attribute\IsGranted;
#[Route('/api')]
#[IsGranted('ROLE_OAUTH2_API')]
class HotelController extends AbstractController
{
public function __construct(private readonly HotelLoader $xmlLoader)
{
}
#[Route('/hotels', name: 'api_hotel_all')]
#[Route('/hotels', name: 'api_hotels_all')]
public function index(): JsonResponse
{
$hotels = $this->xmlLoader->loadAll();
@@ -34,4 +36,4 @@ class HotelController extends AbstractController
return $this->json($hotel, Response::HTTP_OK, [], ['groups' => 'api:single']);
}
}
}