src/Tenant/EventListener/Token/TenantListener.php
public function created(JWTCreatedEvent $event)
    {
        $payload = $event->getData();
        $user = $event->getUser();
        $payload[$this->attribute] = $user->getTenant();
        $event->setData($payload);
    }
public function created(JWTCreatedEvent $event)
    {
        $payload = $event->getData();
        $user = $event->getUser();
        $payload[$this->attribute] = $user->getTenant();
        $event->setData($payload);
    }
public function created ( JWTCreatedEvent $ event ) { $ payload = $ event -> getData ( ) ; $ user = $ event -> getUser ( ) ; $ payload [ $ this -> attribute ] = $ user -> getTenant ( ) ; $ event -> setData ( $ payload ) ; }
Add the user tenant to the token

@param \Lexik\Bundle\JWTAuthenticationBundle\Event\JWTCreatedEvent $event
Add the user tenant to the token