mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Tokens module setup
This commit is contained in:
parent
c555a707e6
commit
33aca37c1c
4 changed files with 46 additions and 0 deletions
|
|
@ -4,11 +4,13 @@ namespace Appwrite\Platform;
|
|||
|
||||
use Appwrite\Platform\Modules\Core;
|
||||
use Utopia\Platform\Platform;
|
||||
use Appwrite\Platform\Modules\Tokens;
|
||||
|
||||
class Appwrite extends Platform
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct(new Core());
|
||||
$this->addModule(new Tokens\Module());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Tokens\Http\Tokens;
|
||||
use Utopia\Platform\Action;
|
||||
use Utopia\Platform\Scope\HTTP;
|
||||
|
||||
class ListTokens extends Action
|
||||
{
|
||||
use HTTP;
|
||||
|
||||
public static function getName()
|
||||
{
|
||||
return 'ListTokens';
|
||||
}
|
||||
}
|
||||
14
src/Appwrite/Platform/Modules/Tokens/Module.php
Normal file
14
src/Appwrite/Platform/Modules/Tokens/Module.php
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Tokens;
|
||||
|
||||
use Appwrite\Platform\Modules\Tokens\Services\Http;
|
||||
use Utopia\Platform;
|
||||
|
||||
class Module extends Platform\Module
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->addService('http', new Http());
|
||||
}
|
||||
}
|
||||
15
src/Appwrite/Platform/Modules/Tokens/Services/Http.php
Normal file
15
src/Appwrite/Platform/Modules/Tokens/Services/Http.php
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace Appwrite\Platform\Modules\Tokens\Services;
|
||||
|
||||
use Appwrite\Platform\Modules\Tokens\Http\Tokens\ListTokens;
|
||||
use Utopia\Platform\Service;
|
||||
|
||||
class Http extends Service
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->type = Service::TYPE_HTTP;
|
||||
$this->addAction(ListTokens::getName(), new ListTokens());
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue