Files
kiri-router/src/Base/AuthorizationInterface.php
T

41 lines
507 B
PHP
Raw Normal View History

2023-04-15 23:29:27 +08:00
<?php
declare(strict_types=1);
namespace Kiri\Message\Handler;
/**
* Interface AuthorizationInterface
* @package Kiri\Http
*/
interface AuthorizationInterface
{
/**
* @return string|int
* 获取唯一识别码
*/
public function getUniqueId(): string|int;
/**
* @param string $key
* @param int $timeout
* @return bool
*/
public function lock(string $key, int $timeout): bool;
/**
* @param string $key
* @return bool
*/
public function unlock(string $key): bool;
}