diff --git a/backend/src/Api/Request/SignRequest.php b/backend/src/Api/Request/SignRequest.php index d0c20af..ec12392 100644 --- a/backend/src/Api/Request/SignRequest.php +++ b/backend/src/Api/Request/SignRequest.php @@ -10,5 +10,4 @@ class SignRequest implements RequestDtoInterface { public string $url; public int $batch; - public string $apiKey; } \ No newline at end of file diff --git a/backend/src/Controller/SignController.php b/backend/src/Controller/SignController.php index 84e72f1..4d0e071 100644 --- a/backend/src/Controller/SignController.php +++ b/backend/src/Controller/SignController.php @@ -15,8 +15,6 @@ use Symfony\Component\Security\Core\Exception\AccessDeniedException; class SignController extends AbstractController { - private const string API_KEY = 'ldskfjhgsdkl;ftghwerot239845yjsdknbgedklhhg'; - public function __construct( private readonly SignService $signService ){ @@ -25,10 +23,6 @@ class SignController extends AbstractController #[Route(path: '/sign', name: 'app.sign', methods: ['POST'])] public function __invoke(Request $request, SignRequest $signRequest): Response { - if ($signRequest->apiKey !== self::API_KEY) { - throw new AccessDeniedException('доступ запрещен'); - } - $token = $request->server->get('HTTP_AUTHORIZATION'); return new JsonResponse($this->signService->signDocument($signRequest->url, $token, $signRequest->batch));