this will break if a token contains a proxy (which could happen in case you have some logic using Doctrine in an early request listener). You need to allow subclasses of ``$this->class`` too