Symfony Exception

Full authentication is required to access this resource.

Exceptions 3

Symfony\Component\HttpKernel\Exception\ HttpException

  1.     private function throwUnauthorizedException(AuthenticationException $authException)
  2.     {
  3.         $this->logger?->notice(sprintf('No Authentication entry point configured, returning a %s HTTP response. Configure "entry_point" on the firewall "%s" if you want to modify the response.'Response::HTTP_UNAUTHORIZED$this->firewallName));
  4.         throw new HttpException(Response::HTTP_UNAUTHORIZED$authException->getMessage(), $authException, [], $authException->getCode());
  5.     }
  6. }
in vendor/symfony/security-http/Firewall/ExceptionListener.php -> throwUnauthorizedException (line 189)
  1.     }
  2.     private function startAuthentication(Request $requestAuthenticationException $authException): Response
  3.     {
  4.         if (null === $this->authenticationEntryPoint) {
  5.             $this->throwUnauthorizedException($authException);
  6.         }
  7.         $this->logger?->debug('Calling Authentication entry point.', ['entry_point' => $this->authenticationEntryPoint]);
  8.         if (!$this->stateless) {
  1.                 $insufficientAuthenticationException = new InsufficientAuthenticationException('Full authentication is required to access this resource.'0$exception);
  2.                 if (null !== $token) {
  3.                     $insufficientAuthenticationException->setToken($token);
  4.                 }
  5.                 $event->setResponse($this->startAuthentication($event->getRequest(), $insufficientAuthenticationException));
  6.             } catch (\Exception $e) {
  7.                 $event->setThrowable($e);
  8.             }
  9.             return;
in vendor/symfony/security-http/Firewall/ExceptionListener.php -> handleAccessDeniedException (line 103)
  1.                 return;
  2.             }
  3.             if ($exception instanceof AccessDeniedException) {
  4.                 $this->handleAccessDeniedException($event$exception);
  5.                 return;
  6.             }
  7.             if ($exception instanceof LazyResponseException) {
  1.         $this->called true;
  2.         $this->priority ??= $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      * @throws \Exception
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
in vendor/symfony/http-kernel/HttpKernel.php -> handleThrowable (line 86)
  1.                 $this->finishRequest($request$type);
  2.                 throw $e;
  3.             }
  4.             return $this->handleThrowable($e$request$type);
  5.         } finally {
  6.             $this->requestStack->pop();
  7.         }
  8.     }
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/srv/beloyal-api/391594/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Symfony\Component\Security\Core\Exception\ InsufficientAuthenticationException

Full authentication is required to access this resource.

  1.         $token $this->tokenStorage->getToken();
  2.         if (!$this->authenticationTrustResolver->isFullFledged($token)) {
  3.             $this->logger?->debug('Access denied, the user is not fully authenticated; redirecting to authentication entry point.', ['exception' => $exception]);
  4.             try {
  5.                 $insufficientAuthenticationException = new InsufficientAuthenticationException('Full authentication is required to access this resource.'0$exception);
  6.                 if (null !== $token) {
  7.                     $insufficientAuthenticationException->setToken($token);
  8.                 }
  9.                 $event->setResponse($this->startAuthentication($event->getRequest(), $insufficientAuthenticationException));
in vendor/symfony/security-http/Firewall/ExceptionListener.php -> handleAccessDeniedException (line 103)
  1.                 return;
  2.             }
  3.             if ($exception instanceof AccessDeniedException) {
  4.                 $this->handleAccessDeniedException($event$exception);
  5.                 return;
  6.             }
  7.             if ($exception instanceof LazyResponseException) {
  1.         $this->called true;
  2.         $this->priority ??= $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      * @throws \Exception
  2.      */
  3.     private function handleThrowable(\Throwable $eRequest $requestint $type): Response
  4.     {
  5.         $event = new ExceptionEvent($this$request$type$e);
  6.         $this->dispatcher->dispatch($eventKernelEvents::EXCEPTION);
  7.         // a listener might have replaced the exception
  8.         $e $event->getThrowable();
  9.         if (!$event->hasResponse()) {
in vendor/symfony/http-kernel/HttpKernel.php -> handleThrowable (line 86)
  1.                 $this->finishRequest($request$type);
  2.                 throw $e;
  3.             }
  4.             return $this->handleThrowable($e$request$type);
  5.         } finally {
  6.             $this->requestStack->pop();
  7.         }
  8.     }
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/srv/beloyal-api/391594/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Symfony\Component\Security\Core\Exception\ AccessDeniedException

Access Denied.

  1.         }
  2.     }
  3.     private function createAccessDeniedException(Request $request, array $attributes)
  4.     {
  5.         $exception = new AccessDeniedException();
  6.         $exception->setAttributes($attributes);
  7.         $exception->setSubject($request);
  8.         return $exception;
  9.     }
in vendor/symfony/security-http/Firewall/AccessListener.php -> createAccessDeniedException (line 91)
  1.         if (null === $token) {
  2.             $token = new NullToken();
  3.         }
  4.         if (!$this->accessDecisionManager->decide($token$attributes$requesttrue)) {
  5.             throw $this->createAccessDeniedException($request$attributes);
  6.         }
  7.     }
  8.     private function createAccessDeniedException(Request $request, array $attributes)
  9.     {
  1.     public function authenticate(RequestEvent $event)
  2.     {
  3.         $startTime microtime(true);
  4.         try {
  5.             $ret $this->listener->authenticate($event);
  6.         } catch (LazyResponseException $e) {
  7.             $this->response $e->getResponse();
  8.             throw $e;
  9.         } finally {
  1. abstract class AbstractListener implements FirewallListenerInterface
  2. {
  3.     final public function __invoke(RequestEvent $event)
  4.     {
  5.         if (false !== $this->supports($event->getRequest())) {
  6.             $this->authenticate($event);
  7.         }
  8.     }
  9.     public static function getPriority(): int
  10.     {
  1.                 }, $listenerFirewallContext::class)();
  2.                 $listener($event);
  3.             } else {
  4.                 $wrappedListener $listener instanceof FirewallListenerInterface ? new WrappedLazyListener($listener) : new WrappedListener($listener);
  5.                 $wrappedListener($event);
  6.                 $wrappedListeners[] = $wrappedListener->getInfo();
  7.                 if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) {
  8.                     $authenticatorManagerListener $listener;
  9.                 }
  10.             }
in vendor/symfony/security-http/Firewall.php -> callListeners (line 92)
  1.             if (null !== $logoutListener) {
  2.                 yield $logoutListener;
  3.             }
  4.         };
  5.         $this->callListeners($event$authenticationListeners());
  6.     }
  7.     public function onKernelFinishRequest(FinishRequestEvent $event)
  8.     {
  9.         $request $event->getRequest();
  1.         $this->called true;
  2.         $this->priority ??= $dispatcher->getListenerPriority($eventName$this->listener);
  3.         $e $this->stopwatch->start($this->name'event_listener');
  4.         ($this->optimizedListener ?? $this->listener)($event$eventName$dispatcher);
  5.         if ($e->isStarted()) {
  6.             $e->stop();
  7.         }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         try {
  2.             $this->beforeDispatch($eventName$event);
  3.             try {
  4.                 $e $this->stopwatch->start($eventName'section');
  5.                 try {
  6.                     $this->dispatcher->dispatch($event$eventName);
  7.                 } finally {
  8.                     if ($e->isStarted()) {
  9.                         $e->stop();
  10.                     }
  11.                 }
  1.      */
  2.     private function handleRaw(Request $requestint $type self::MAIN_REQUEST): Response
  3.     {
  4.         // request
  5.         $event = new RequestEvent($this$request$type);
  6.         $this->dispatcher->dispatch($eventKernelEvents::REQUEST);
  7.         if ($event->hasResponse()) {
  8.             return $this->filterResponse($event->getResponse(), $request$type);
  9.         }
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  1.         $this->request $request;
  2.     }
  3.     public function run(): int
  4.     {
  5.         $response $this->kernel->handle($this->request);
  6.         $response->send();
  7.         if ($this->kernel instanceof TerminableInterface) {
  8.             $this->kernel->terminate($this->request$response);
  9.         }
in vendor/autoload_runtime.php -> run (line 29)
  1. $app $app(...$args);
  2. exit(
  3.     $runtime
  4.         ->getRunner($app)
  5.         ->run()
  6. );
require_once('/srv/beloyal-api/391594/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

No log messages

Stack Traces 3

[3/3] HttpException
Symfony\Component\HttpKernel\Exception\HttpException:
Full authentication is required to access this resource.

  at vendor/symfony/security-http/Firewall/ExceptionListener.php:232
  at Symfony\Component\Security\Http\Firewall\ExceptionListener->throwUnauthorizedException()
     (vendor/symfony/security-http/Firewall/ExceptionListener.php:189)
  at Symfony\Component\Security\Http\Firewall\ExceptionListener->startAuthentication()
     (vendor/symfony/security-http/Firewall/ExceptionListener.php:148)
  at Symfony\Component\Security\Http\Firewall\ExceptionListener->handleAccessDeniedException()
     (vendor/symfony/security-http/Firewall/ExceptionListener.php:103)
  at Symfony\Component\Security\Http\Firewall\ExceptionListener->onKernelException()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:153)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/http-kernel/HttpKernel.php:223)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
     (vendor/symfony/http-kernel/HttpKernel.php:86)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:29)
  at require_once('/srv/beloyal-api/391594/vendor/autoload_runtime.php')
     (public/index.php:5)                
[2/3] InsufficientAuthenticationException
Symfony\Component\Security\Core\Exception\InsufficientAuthenticationException:
Full authentication is required to access this resource.

  at vendor/symfony/security-http/Firewall/ExceptionListener.php:143
  at Symfony\Component\Security\Http\Firewall\ExceptionListener->handleAccessDeniedException()
     (vendor/symfony/security-http/Firewall/ExceptionListener.php:103)
  at Symfony\Component\Security\Http\Firewall\ExceptionListener->onKernelException()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:153)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/http-kernel/HttpKernel.php:223)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable()
     (vendor/symfony/http-kernel/HttpKernel.php:86)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:29)
  at require_once('/srv/beloyal-api/391594/vendor/autoload_runtime.php')
     (public/index.php:5)                
[1/3] AccessDeniedException
Symfony\Component\Security\Core\Exception\AccessDeniedException:
Access Denied.

  at vendor/symfony/security-http/Firewall/AccessListener.php:97
  at Symfony\Component\Security\Http\Firewall\AccessListener->createAccessDeniedException()
     (vendor/symfony/security-http/Firewall/AccessListener.php:91)
  at Symfony\Component\Security\Http\Firewall\AccessListener->authenticate()
     (vendor/symfony/security-bundle/Debug/WrappedLazyListener.php:49)
  at Symfony\Bundle\SecurityBundle\Debug\WrappedLazyListener->authenticate()
     (vendor/symfony/security-http/Firewall/AbstractListener.php:26)
  at Symfony\Component\Security\Http\Firewall\AbstractListener->__invoke()
     (vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:73)
  at Symfony\Bundle\SecurityBundle\Debug\TraceableFirewallListener->callListeners()
     (vendor/symfony/security-http/Firewall.php:92)
  at Symfony\Component\Security\Http\Firewall->onKernelRequest()
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:115)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:153)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch()
     (vendor/symfony/http-kernel/HttpKernel.php:139)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:29)
  at require_once('/srv/beloyal-api/391594/vendor/autoload_runtime.php')
     (public/index.php:5)