| @@ 56-65 (lines=10) @@ | ||
| 53 | /** |
|
| 54 | * Check whether a particular user has an OTP secret set. |
|
| 55 | */ |
|
| 56 | public function getOtpSecret($userId) |
|
| 57 | { |
|
| 58 | $otpSecretFile = sprintf('%s/%s', $this->configDir, $userId); |
|
| 59 | ||
| 60 | if ($this->io->isFile($otpSecretFile)) { |
|
| 61 | return $this->io->readFile($otpSecretFile); |
|
| 62 | } |
|
| 63 | ||
| 64 | return false; |
|
| 65 | } |
|
| 66 | ||
| 67 | /** |
|
| 68 | * Set or delete the OTP secret for a particular user. |
|
| @@ 43-52 (lines=10) @@ | ||
| 40 | /** |
|
| 41 | * Check whether a particular user has a VOOT token set. |
|
| 42 | */ |
|
| 43 | public function getVootToken($userId) |
|
| 44 | { |
|
| 45 | $vootTokenFile = sprintf('%s/%s', $this->configDir, $userId); |
|
| 46 | ||
| 47 | if ($this->io->isFile($vootTokenFile)) { |
|
| 48 | return $this->io->readFile($vootTokenFile); |
|
| 49 | } |
|
| 50 | ||
| 51 | return false; |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Set or delete the VOOT token for a particular user. |
|