|
7 | 7 | * @license MIT |
8 | 8 | */ |
9 | 9 |
|
10 | | -use chillerlan\Database\{ |
11 | | - Database, DatabaseOptionsTrait, Drivers\MySQLiDrv |
12 | | -}; |
13 | | -use chillerlan\HTTP\{ |
14 | | - HTTPClientAbstract, HTTPResponseInterface, CurlClient |
15 | | -}; |
16 | | -use chillerlan\Logger\{ |
17 | | - Log, LogOptionsTrait, Output\ConsoleLog |
18 | | -}; |
19 | | -use chillerlan\OAuth\{ |
20 | | - OAuthOptions, Storage\SessionStorage |
21 | | -}; |
| 10 | +use chillerlan\HTTP\{CurlClient, HTTPClientAbstract, HTTPResponseInterface}; |
| 11 | +use chillerlan\Logger\{Log, LogOptionsTrait, Output\ConsoleLog}; |
| 12 | +use chillerlan\OAuth\{OAuthOptions, Storage\SessionStorage}; |
22 | 13 | use chillerlan\Traits\{DotEnv, ImmutableSettingsInterface}; |
23 | 14 |
|
24 | 15 | ini_set('date.timezone', 'Europe/Amsterdam'); |
|
33 | 24 | 'key' => $env->get($ENVVAR.'_KEY'), |
34 | 25 | 'secret' => $env->get($ENVVAR.'_SECRET'), |
35 | 26 | 'callbackURL' => $env->get($ENVVAR.'_CALLBACK_URL'), |
36 | | - 'dbUserID' => 1, |
37 | | - 'dbTokenTable' => 'storagetest', |
38 | | - 'dbProviderTable' => 'storagetest_providers', |
39 | | - 'storageCryptoKey' => '000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f', |
40 | 27 | 'tokenAutoRefresh' => true, |
41 | 28 |
|
42 | | - // DatabaseOptions |
43 | | - 'driver' => MySQLiDrv::class, |
44 | | - 'host' => $env->MYSQL_HOST, |
45 | | - 'port' => $env->MYSQL_PORT, |
46 | | - 'database' => $env->MYSQL_DATABASE, |
47 | | - 'username' => $env->MYSQL_USERNAME, |
48 | | - 'password' => $env->MYSQL_PASSWORD, |
49 | | - |
50 | 29 | // HTTPOptions |
51 | 30 | 'ca_info' => $CFGDIR.'/cacert.pem', |
52 | 31 | 'userAgent' => 'chillerlanPhpOAuth/3.0.0 +https://github.com/codemasher/php-oauth', |
|
60 | 39 |
|
61 | 40 | /** @var \chillerlan\Traits\ImmutableSettingsInterface $options */ |
62 | 41 | $options = new class($options_arr) extends OAuthOptions{ |
63 | | - use DatabaseOptionsTrait, LogOptionsTrait; |
| 42 | + use LogOptionsTrait; |
64 | 43 |
|
65 | 44 | protected $sleep; |
66 | 45 | }; |
@@ -101,10 +80,6 @@ protected function getResponse():HTTPResponseInterface{ |
101 | 80 |
|
102 | 81 | #$http->setLogger($logger); |
103 | 82 |
|
104 | | -/** @var \chillerlan\Database\Database $db */ |
105 | | -$db = new Database($options); |
106 | | -#$db->setLogger($logger); |
107 | | - |
108 | 83 | /** @var \chillerlan\OAuth\Storage\OAuthStorageInterface $storage */ |
109 | | -$storage = new SessionStorage($options); //new DBStorage($options, $db); |
| 84 | +$storage = new SessionStorage($options); |
110 | 85 | #$storage->setLogger($logger); |
0 commit comments