format("c"); return sodium_bin2base64(sodium_crypto_sign($message, $sign_secret), SODIUM_BASE64_VARIANT_URLSAFE); } protected static function createClientWithToken($authName = "FooMan"): Client { return static::createClient([], [ 'headers' => [ 'accept' => 'application/json', 'X-AUTH-TOKEN' => static::generateAuthToken($authName) ] ]); } protected function getIri(Thing|Proxy $thing) { if ($thing instanceof Proxy) { return $this->getIriFromResource($thing->object()); } return $this->getIriFromResource($thing); } protected function getEntityManager(): EntityManagerInterface { return static::$kernel->getContainer()->get('doctrine.orm.entity_manager'); } }