mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 01:03:13 +08:00
Feature/name api keys
This commit is contained in:
@@ -21,9 +21,12 @@ class ApiKeyService implements ApiKeyServiceInterface
|
||||
$this->em = $em;
|
||||
}
|
||||
|
||||
public function create(?Chronos $expirationDate = null, RoleDefinition ...$roleDefinitions): ApiKey
|
||||
{
|
||||
$key = new ApiKey($expirationDate);
|
||||
public function create(
|
||||
?Chronos $expirationDate = null,
|
||||
?string $name = null,
|
||||
RoleDefinition ...$roleDefinitions
|
||||
): ApiKey {
|
||||
$key = new ApiKey($expirationDate, $name);
|
||||
foreach ($roleDefinitions as $definition) {
|
||||
$key->registerRole($definition);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user