Added a system to set roles to API keys

This commit is contained in:
Alejandro Celaya
2021-01-02 19:35:16 +01:00
parent ecf22ae4b6
commit 7e6882960e
6 changed files with 135 additions and 3 deletions

View File

@@ -0,0 +1,31 @@
<?php
declare(strict_types=1);
namespace Shlinkio\Shlink\Rest\Entity;
use Shlinkio\Shlink\Common\Entity\AbstractEntity;
class ApiKeyRole extends AbstractEntity
{
private string $roleName;
private array $meta;
private ApiKey $apiKey;
public function __construct(string $roleName, array $meta, ApiKey $apiKey)
{
$this->roleName = $roleName;
$this->meta = $meta;
$this->apiKey = $apiKey;
}
public function name(): string
{
return $this->roleName;
}
public function meta(): array
{
return $this->meta;
}
}