Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Authentication Provider found for token of class "Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken". #59

Open
eMerzh opened this issue Nov 26, 2015 · 0 comments

Comments

@eMerzh
Copy link

eMerzh commented Nov 26, 2015

i was using the liuggio_stats_d_client.collector.user collector...

it worked find until i found that in my api for some reasons i got some 500 errors:

here is a summary of the stack trace...
hope it helps

Symfony\Component\Security\Core\Exception\ProviderNotFoundException: No Authentication Provider found for token of class "Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken".
  File "/myapp/web/app.php", line 38, in null
    $response = $kernel->handle($request);
  File "/myapp/app/bootstrap.php.cache", line 2444, in handle
    return $this->getHttpKernel()->handle($request, $type, $catch);
  File "/myapp/app/bootstrap.php.cache", line 3222, in handle
    $response = parent::handle($request, $type, $catch);
  File "/myapp/app/bootstrap.php.cache", line 3071, in handle
    return $this->handleRaw($request, $type);
  File "/myapp/app/bootstrap.php.cache", line 3124, in handleRaw
    return $this->filterResponse($response, $request, $type);
  File "/myapp/app/bootstrap.php.cache", line 3129, in filterResponse
    $this->dispatcher->dispatch(KernelEvents::RESPONSE, $event);
  File "/myapp/app/cache/prod/classes.php", line 2577, in dispatch
    $this->doDispatch($listeners, $eventName, $event);
  File "/myapp/app/cache/prod/classes.php", line 2648, in doDispatch
    call_user_func($listener, $event, $eventName, $this);
  File "/myapp/vendor/liuggio/statsd-client-bundle/Liuggio/StatsDClientBundle/Listener/StatsDCollectorListener.php", line 81, in onKernelResponse
    $dataToSend = $this->collector->collect($master, $request, $event->getResponse(), $exception);
  File "/myapp/vendor/liuggio/statsd-client-bundle/Liuggio/StatsDClientBundle/Service/StatsDCollectorService.php", line 49, in collect
    $collector->collect($request, $response, $exception);
  File "/myapp/vendor/liuggio/statsd-client-bundle/Liuggio/StatsDClientBundle/StatsCollector/UserStatsCollector.php", line 31, in collect
    if ($this->getSecurityContext()->isGranted('IS_AUTHENTICATED_FULLY')) {
  File "/myapp/vendor/symfony/symfony/src/Symfony/Component/Security/Core/SecurityContext.php", line 102, in isGranted
    return $this->authorizationChecker->isGranted($attributes, $object);
  File "/myapp/app/cache/prod/classes.php", line 3693, in isGranted
    $this->tokenStorage->setToken($token = $this->authenticationManager->authenticate($token));
  File "/myapp/app/cache/prod/classes.php", line 3494, in authenticate
    $lastException = new ProviderNotFoundException(sprintf('No Authentication Provider found for token of class "%s".', get_class($token)));

if i disable this collector, everything fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant