From a74ef181e9acc58283a6c2fad773e3608b59b862 Mon Sep 17 00:00:00 2001 From: Sven Paulsen Date: Wed, 7 Jun 2023 12:54:00 +0200 Subject: [PATCH] always use connect as default subject --- src/TokenGenerator.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TokenGenerator.php b/src/TokenGenerator.php index 866a786..8e7138c 100644 --- a/src/TokenGenerator.php +++ b/src/TokenGenerator.php @@ -46,7 +46,7 @@ public function createToken($roomId, $userId, $options = array()) "rid" => $roomId, "uid" => strval($userId), "cid" => isset($options["customer"]) ? strval($options["customer"]) : null, - "sub" => isset($options["audience"]) && $options["audience"] == "sfu" ? "login" : "connect", + "sub" => isset($options["subjects"]) ? $options["subjects"] : "connect", "aud" => isset($options["audience"]) ? strval($options["audience"]) : null, "exp" => time() + (isset($options["lifetime"]) ? intval($options["lifetime"]) : 300), "nbf" => time(), @@ -63,7 +63,7 @@ public function createToken($roomId, $userId, $options = array()) /** - * Encodes data with MIME base64 in an URL-safe variant. + * Encodes data with MIME base64 in an URL-safe variant. * * @param string $data * @return string