| 1 | <?php |
||
| 8 | class TokenConfig |
||
| 9 | { |
||
| 10 | const APPLICATION_NAME = 'GoogleAuthenticator'; |
||
| 11 | |||
| 12 | private $tokens; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var string defaultKey |
||
| 16 | */ |
||
| 17 | private $defaultKey; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param array $tokens |
||
| 21 | */ |
||
| 22 | public function __construct(array $tokens) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Get the key from the argument or the default key. |
||
| 37 | */ |
||
| 38 | public function getKey(string $key = null): string |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Get all keys. |
||
| 53 | * |
||
| 54 | * @return array |
||
| 55 | */ |
||
| 56 | public function getAllKeys(): array |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @return string |
||
| 63 | */ |
||
| 64 | public function getClientId(string $tokenName = null) |
||
| 68 | |||
| 69 | /** |
||
| 70 | * @return string |
||
| 71 | */ |
||
| 72 | public function getRedirectUrl($tokenName = null) |
||
| 76 | |||
| 77 | /** |
||
| 78 | * @return array |
||
| 79 | */ |
||
| 80 | public function getScopes($tokenName = null) |
||
| 84 | |||
| 85 | /** |
||
| 86 | * @return string |
||
| 87 | */ |
||
| 88 | public function getSecret($tokenName = null) |
||
| 92 | |||
| 93 | public function getApplicationName(): string |
||
| 97 | } |
||
| 98 |