From 8c4f3f7f9d092a2c4c78560c18b266ed2b843d72 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Mon, 28 Dec 2020 18:41:03 +0200 Subject: [PATCH] New JWT model --- src/Appwrite/Utopia/Response/Model/JWT.php | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/Appwrite/Utopia/Response/Model/JWT.php diff --git a/src/Appwrite/Utopia/Response/Model/JWT.php b/src/Appwrite/Utopia/Response/Model/JWT.php new file mode 100644 index 0000000000..490506ff94 --- /dev/null +++ b/src/Appwrite/Utopia/Response/Model/JWT.php @@ -0,0 +1,45 @@ +addRule('$id', [ + 'type' => self::TYPE_STRING, + 'description' => 'User ID.', + 'example' => '5e5ea5c16897e', + ]) + ->addRule('name', [ + 'type' => self::TYPE_STRING, + 'description' => 'User name.', + 'example' => 'John Doe', + ]) + ; + } + + /** + * Get Name + * + * @return string + */ + public function getName():string + { + return 'JWT'; + } + + /** + * Get Collection + * + * @return string + */ + public function getType():string + { + return Response::MODEL_JWT; + } +} \ No newline at end of file