Updated services required to initialize API keys with roles

This commit is contained in:
Alejandro Celaya
2021-01-10 20:05:14 +01:00
parent 95e51665b1
commit c9ff2b3834
7 changed files with 70 additions and 9 deletions

View File

@@ -6,11 +6,12 @@ namespace Shlinkio\Shlink\Rest\Service;
use Cake\Chronos\Chronos;
use Shlinkio\Shlink\Common\Exception\InvalidArgumentException;
use Shlinkio\Shlink\Rest\ApiKey\Model\RoleDefinition;
use Shlinkio\Shlink\Rest\Entity\ApiKey;
interface ApiKeyServiceInterface
{
public function create(?Chronos $expirationDate = null): ApiKey;
public function create(?Chronos $expirationDate = null, RoleDefinition ...$roleDefinitions): ApiKey;
public function check(string $key): ApiKeyCheckResult;