Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-20681

eZRest v2: Not able to login with a user created via REST, get exception : A Token was not found in the SecurityContext.

    XMLWordPrintable

Details

    Description

      After creating a user using REST v2, you'll get a fatal error when trying to login with that user:

       A Token was not found in the SecurityContext.
      500 Internal Server Error - AuthenticationCredentialsNotFoundException 
      
      Stack Trace
          in /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/Security/Http/Firewall/AccessListener.php at line 56  -+
                  public function handle(GetResponseEvent $event)
                  {
                      if (null === $token = $this->context->getToken()) {
                          throw new AuthenticationCredentialsNotFoundException('A Token was not found in the SecurityContext.');
                      }
                      $request = $event->getRequest();
          at AccessListener ->handle (object(GetResponseEvent))
          in kernel.root_dir/cache/dev/classes.php at line 4047  -+
          at Firewall ->onKernelRequest (object(GetResponseEvent))
          at call_user_func (array(object(Firewall), 'onKernelRequest'), object(GetResponseEvent))
          in /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php at line 447  -+
          at Symfony\Component\HttpKernel\Debug\{closure} (object(GetResponseEvent))
          at call_user_func (object(Closure), object(GetResponseEvent))
          in kernel.root_dir/cache/dev/classes.php at line 3419  -+
          at EventDispatcher ->doDispatch (array(object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure), object(Closure)), 'kernel.request', object(GetResponseEvent))
          in kernel.root_dir/cache/dev/classes.php at line 3352  -+
          at EventDispatcher ->dispatch ('kernel.request', object(GetResponseEvent))
          in kernel.root_dir/cache/dev/classes.php at line 3516  -+
          at ContainerAwareEventDispatcher ->dispatch ('kernel.request', object(GetResponseEvent))
          in /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php at line 135  -+
          at TraceableEventDispatcher ->dispatch ('kernel.request', object(GetResponseEvent))
          in /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php at line 110  -+
          at HttpKernel ->handleRaw (object(Request), '1')
          in /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php at line 73  -+
          at HttpKernel ->handle (object(Request), '1', true)
          in /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/DependencyInjection/ContainerAwareHttpKernel.php at line 57  -+
          at ContainerAwareHttpKernel ->handle (object(Request), '1', true)
          in /var/www/apache2php53/ezpublish5/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php at line 197  -+
          at Kernel ->handle (object(Request))
          in /var/www/apache2php53/ezpublish5/web/index_dev.php at line 14  -+
      

      See issue EZP-20677 for how I am creating the user

      As you can see from EZP-20677, I am creating a admin user, and I am trying to login to the admin interface

      Attachments

        Activity

          People

            Unassigned Unassigned
            vidar.langseid@ibexa.co Vidar Langseid
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h