1 | <?php |
||
11 | class SessionTokenStore implements TokenStoreInterface |
||
12 | { |
||
13 | /** |
||
14 | * @var int hard limit for unique tokens stored per user session |
||
15 | */ |
||
16 | const HARD_LIMIT = 10; |
||
17 | |||
18 | /** |
||
19 | * @var bool[] map of tokens validated and consumed during the lifetime of this object |
||
20 | */ |
||
21 | private $valid = []; |
||
22 | |||
23 | /** |
||
24 | * @inheritdoc |
||
25 | * |
||
26 | * @throws RuntimeException |
||
27 | * |
||
28 | * @SuppressWarnings(Superglobals) |
||
29 | */ |
||
30 | public function registerToken($token) |
||
48 | |||
49 | /** |
||
50 | * @inheritdoc |
||
51 | * |
||
52 | * @throws RuntimeException |
||
53 | * |
||
54 | * @SuppressWarnings(Superglobals) |
||
55 | */ |
||
56 | public function verifyToken($token) |
||
70 | |||
71 | /** |
||
72 | * @inheritdoc |
||
73 | * |
||
74 | * @SuppressWarnings(Superglobals) |
||
75 | */ |
||
76 | public function getClientSalt() |
||
80 | } |
||
81 |