Exceptions
Exceptions 3
Symfony\Component\HttpKernel\Exception\ HttpException
{
if (null !== $this->logger) {
$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));
}
throw new HttpException(Response::HTTP_UNAUTHORIZED, $authException->getMessage(), $authException, [], $authException->getCode());
}
}
in
vendor/symfony/security-http/Firewall/ExceptionListener.php
->
throwUnauthorizedException
(line 199)
}
private function startAuthentication(Request $request, AuthenticationException $authException): Response
{
if (null === $this->authenticationEntryPoint) {
$this->throwUnauthorizedException($authException);
}
if (null !== $this->logger) {
$this->logger->debug('Calling Authentication entry point.');
}
in
vendor/symfony/security-http/Firewall/ExceptionListener.php
->
startAuthentication
(line 152)
$insufficientAuthenticationException = new InsufficientAuthenticationException('Full authentication is required to access this resource.', 0, $exception);
if (null !== $token) {
$insufficientAuthenticationException->setToken($token);
}
$event->setResponse($this->startAuthentication($event->getRequest(), $insufficientAuthenticationException));
} catch (\Exception $e) {
$event->setThrowable($e);
}
return;
in
vendor/symfony/security-http/Firewall/ExceptionListener.php
->
handleAccessDeniedException
(line 103)
return;
}
if ($exception instanceof AccessDeniedException) {
$this->handleAccessDeniedException($event, $exception);
return;
}
if ($exception instanceof LazyResponseException) {
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
->
onKernelException
(line 117)
$this->called = true;
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
if ($e->isStarted()) {
$e->stop();
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
__invoke
(line 230)
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 59)
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
->
dispatch
(line 154)
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 213)
* @throws \Exception
*/
private function handleThrowable(\Throwable $e, Request $request, int $type): Response
{
$event = new ExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);
// a listener might have replaced the exception
$e = $event->getThrowable();
if (!$event->hasResponse()) {
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleThrowable
(line 85)
$this->finishRequest($request, $type);
throw $e;
}
return $this->handleThrowable($e, $request, $type);
}
}
/**
* {@inheritdoc}
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;
}
}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
in
vendor/autoload_runtime.php
->
run
(line 35)
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
require_once('/var/www/vhosts/billing.mmcreation.com/api/vendor/autoload_runtime.php')
in
public/index.php
(line 5)
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
Symfony\Component\Security\Core\Exception\ InsufficientAuthenticationException
if (null !== $this->logger) {
$this->logger->debug('Access denied, the user is not fully authenticated; redirecting to authentication entry point.', ['exception' => $exception]);
}
try {
$insufficientAuthenticationException = new InsufficientAuthenticationException('Full authentication is required to access this resource.', 0, $exception);
if (null !== $token) {
$insufficientAuthenticationException->setToken($token);
}
$event->setResponse($this->startAuthentication($event->getRequest(), $insufficientAuthenticationException));
in
vendor/symfony/security-http/Firewall/ExceptionListener.php
->
handleAccessDeniedException
(line 103)
return;
}
if ($exception instanceof AccessDeniedException) {
$this->handleAccessDeniedException($event, $exception);
return;
}
if ($exception instanceof LazyResponseException) {
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
->
onKernelException
(line 117)
$this->called = true;
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
if ($e->isStarted()) {
$e->stop();
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
__invoke
(line 230)
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 59)
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
->
dispatch
(line 154)
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 213)
* @throws \Exception
*/
private function handleThrowable(\Throwable $e, Request $request, int $type): Response
{
$event = new ExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);
// a listener might have replaced the exception
$e = $event->getThrowable();
if (!$event->hasResponse()) {
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleThrowable
(line 85)
$this->finishRequest($request, $type);
throw $e;
}
return $this->handleThrowable($e, $request, $type);
}
}
/**
* {@inheritdoc}
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;
}
}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
in
vendor/autoload_runtime.php
->
run
(line 35)
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
require_once('/var/www/vhosts/billing.mmcreation.com/api/vendor/autoload_runtime.php')
in
public/index.php
(line 5)
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
Symfony\Component\Security\Core\Exception\ AccessDeniedException
in
vendor/symfony/security-http/Firewall/AccessListener.php
(line 132)
}
}
private function createAccessDeniedException(Request $request, array $attributes)
{
$exception = new AccessDeniedException();
$exception->setAttributes($attributes);
$exception->setSubject($request);
return $exception;
}
in
vendor/symfony/security-http/Firewall/AccessListener.php
->
createAccessDeniedException
(line 126)
$this->tokenStorage->setToken($token);
}
}
if (!$this->accessDecisionManager->decide($token, $attributes, $request, true)) {
throw $this->createAccessDeniedException($request, $attributes);
}
}
private function createAccessDeniedException(Request $request, array $attributes)
{
in
vendor/symfony/security-bundle/Debug/WrappedLazyListener.php
->
authenticate
(line 49)
public function authenticate(RequestEvent $event)
{
$startTime = microtime(true);
try {
$ret = $this->listener->authenticate($event);
} catch (LazyResponseException $e) {
$this->response = $e->getResponse();
throw $e;
} finally {
in
vendor/symfony/security-bundle/Security/LazyFirewallContext.php
->
authenticate
(line 60)
}
}
if (!$lazy) {
foreach ($listeners as $listener) {
$listener($event);
if ($event->hasResponse()) {
return;
}
}
in
vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php
->
__invoke
(line 70)
}
}
$this->listeners = $listeners;
}, $listener, FirewallContext::class)();
$listener($event);
} else {
$wrappedListener = $listener instanceof FirewallListenerInterface ? new WrappedLazyListener($listener) : new WrappedListener($listener);
$wrappedListener($event);
$wrappedListeners[] = $wrappedListener->getInfo();
if (!$authenticatorManagerListener && $listener instanceof TraceableAuthenticatorManagerListener) {
in
vendor/symfony/security-http/Firewall.php
->
callListeners
(line 92)
if (null !== $logoutListener) {
yield $logoutListener;
}
};
$this->callListeners($event, $authenticationListeners());
}
public function onKernelFinishRequest(FinishRequestEvent $event)
{
$request = $event->getRequest();
in
vendor/symfony/event-dispatcher/Debug/WrappedListener.php
->
onKernelRequest
(line 117)
$this->called = true;
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
if ($e->isStarted()) {
$e->stop();
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
__invoke
(line 230)
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 59)
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
in
vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
->
dispatch
(line 154)
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 128)
{
$this->requestStack->push($request);
// request
$event = new RequestEvent($this, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 74)
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
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;
}
}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
in
vendor/autoload_runtime.php
->
run
(line 35)
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
require_once('/var/www/vhosts/billing.mmcreation.com/api/vendor/autoload_runtime.php')
in
public/index.php
(line 5)
<?php
use App\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
};
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:248 at Symfony\Component\Security\Http\Firewall\ExceptionListener->throwUnauthorizedException() (vendor/symfony/security-http/Firewall/ExceptionListener.php:199) at Symfony\Component\Security\Http\Firewall\ExceptionListener->startAuthentication() (vendor/symfony/security-http/Firewall/ExceptionListener.php:152) 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:117) 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:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:213) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (vendor/symfony/http-kernel/HttpKernel.php:85) 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:35) at require_once('/var/www/vhosts/billing.mmcreation.com/api/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:147 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:117) 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:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:213) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (vendor/symfony/http-kernel/HttpKernel.php:85) 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:35) at require_once('/var/www/vhosts/billing.mmcreation.com/api/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:132 at Symfony\Component\Security\Http\Firewall\AccessListener->createAccessDeniedException() (vendor/symfony/security-http/Firewall/AccessListener.php:126) 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-bundle/Security/LazyFirewallContext.php:60) at Symfony\Bundle\SecurityBundle\Security\LazyFirewallContext->__invoke() (vendor/symfony/security-bundle/Debug/TraceableFirewallListener.php:70) 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:117) 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:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:128) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:74) 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:35) at require_once('/var/www/vhosts/billing.mmcreation.com/api/vendor/autoload_runtime.php') (public/index.php:5) |