From ccdb8b0d12a5170d9961714dda00d65033c78f64 Mon Sep 17 00:00:00 2001 From: Jan Dusek Date: Tue, 27 Mar 2018 12:06:05 +0800 Subject: [PATCH] Return token as JSON, remove Room from grant --- index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.php b/index.php index 2009f85..0f466a1 100755 --- a/index.php +++ b/index.php @@ -20,7 +20,8 @@ // Grant access to Video $grant = new VideoGrant(); -$grant->setRoom($room); +//$grant->setRoom($room); $token->addGrant($grant); -echo $token->toJWT(); +header('Content-Type: application/json; charset=utf-8'); +echo '{"identity":"'.$identity.'","token":"'.$token->toJWT().'" }';