Exceptions
Exception
Symfony\Component\HttpKernel\Exception\ UnauthorizedHttpException
in
src/Auth/TokenAuth.php
(line 30)
/*** @var Customer|null*/$customer = $this->entityManager->getRepository(Customer::class)->getCustomerByToken($token);if (!$customer) {throw new UnauthorizedHttpException('Not authorized');}return $customer;}
* Testing connection with update service*/#[Route('/check_connection', name: 'release.connection')]public function checkConnectionAction(){$project = $this->tokenAuth->getCustomerByToken();return new JsonResponse(['connection' => true]);}/**
in
vendor/symfony/http-kernel/HttpKernel.php
->
checkConnectionAction
(line 163)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);try {return $this->handleRaw($request, $type);} catch (\Exception $e) {if ($e instanceof RequestExceptionInterface) {$e = new BadRequestHttpException($e->getMessage(), $e);}if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();++$this->requestStackSize;$this->resetServices = true;try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
Request::setTrustedHosts(explode(',', $trustedHosts));}$kernel = new Kernel($env, $debug);$request = Request::createFromGlobals();$response = $kernel->handle($request);$response->send();$kernel->terminate($request, $response);
Stack Trace
|
UnauthorizedHttpException
|
|---|
Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException:
at src/Auth/TokenAuth.php:30
at App\Auth\TokenAuth->getCustomerByToken()
(src/Controller/API/ReleaseController.php:26)
at App\Controller\API\ReleaseController->checkConnectionAction()
(vendor/symfony/http-kernel/HttpKernel.php:163)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
(vendor/symfony/http-kernel/HttpKernel.php:75)
at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
(vendor/symfony/http-kernel/Kernel.php:202)
at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
(public/index.php:34)
|