Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
31 | protected function getTotp(StoreInterface $store): TOTPInterface |
||
32 | { |
||
33 | $state = $store->getState(); |
||
34 | if (!isset($state['secret'])) { |
||
35 | throw new RuntimeException('TOTP secret is not available in the StoreInterface'); |
||
36 | } |
||
37 | return TOTP::create($state['secret']); |
||
38 | } |
||
40 |