1 | <?php |
||
4 | class ExecutionToken { |
||
5 | |||
6 | const SEPARATOR = '_'; |
||
7 | const DEFAULT_TIMEOUT_SEC = 600; |
||
8 | |||
9 | /** @var int */ |
||
10 | private $timeoutSec = self::DEFAULT_TIMEOUT_SEC; |
||
11 | |||
12 | /** @var string */ |
||
13 | private $secret; |
||
14 | |||
15 | /** |
||
16 | * @param string $secret |
||
17 | */ |
||
18 | public function __construct($secret) { |
||
21 | |||
22 | public function generate($actionId) { |
||
26 | |||
27 | public function isValid($token, $actionId) { |
||
31 | |||
32 | private function hash($actionId, $time) { |
||
35 | |||
36 | public function setTimeout($sec) { |
||
40 | } |