1
0
Fork 0
mirror of synced 2024-06-28 03:01:15 +12:00

New JWT model

This commit is contained in:
Eldad Fux 2020-12-28 18:41:03 +02:00
parent 9c712acd5e
commit 8c4f3f7f9d

View file

@ -0,0 +1,45 @@
<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class JWT extends Model
{
public function __construct()
{
$this
->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;
}
}