<?php declare(strict_types=1);

namespace App\Engine\Admin\Auth;

final readonly class ApiEntryPoint implements \Symfony\Component\Security\Http\EntryPoint\AuthenticationEntryPointInterface
{

    public function start(\Symfony\Component\HttpFoundation\Request $request, ?\Symfony\Component\Security\Core\Exception\AuthenticationException $authException = null): \Symfony\Component\HttpFoundation\Response
    {
        return new \Symfony\Component\HttpFoundation\JsonResponse([
            'error' => 'Unauthorized',
        ], 401);
    }

}