code: public static function createFromPayload($username, array $payload)
      {
          // @todo Populate security user model using callbacks from JWT token event listeners, instead of hard-coded here
          $uuid = $payload['uuid'] ?? null;
          $roles = $payload['roles'] ?? [];
          $identity = new Identity;
          $identity->setRoles($payload['identity']->roles ?? []);
          $identity->setType($payload['identity']->type ?? null);
          $identity->setUuid($payload['identity']->uuid ?? null);
          $tenant = $payload['tenant'] ?? null;
  
          return new static($username, $uuid, $roles, $identity, $tenant);
      }
docs: {@inheritdoc}