| 1 | <?php |
||
| 10 | abstract class BaseDataStorage implements DataStorageInterface |
||
| 11 | { |
||
| 12 | public static $validKeys = ['state', 'code', 'access_token', 'redirect_uri']; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * {@inheritdoc} |
||
| 16 | */ |
||
| 17 | 1 | public function clearAll() |
|
| 23 | |||
| 24 | /** |
||
| 25 | * Validate key. Throws an exception if key is not valid. |
||
| 26 | * |
||
| 27 | * @param string $key |
||
| 28 | * |
||
| 29 | * @throws InvalidArgumentException |
||
| 30 | */ |
||
| 31 | 10 | protected function validateKey($key) |
|
| 37 | |||
| 38 | /** |
||
| 39 | * Generate an ID to use with the data storage. |
||
| 40 | * |
||
| 41 | * @param $key |
||
| 42 | * |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | 6 | protected function getStorageKeyId($key) |
|
| 49 | } |
||
| 50 |