use EaseBaidu\Factory;
$config = [
'debug' => 1, // 发布前填写或者修改的环境
'client_id' => 'xxx',
'secret' => 'xxx',
'token' => 'xxx',
'aes_key' => 'xxx',
'log' => [
'name' => 'EaseBearTp',
'level' => 'debug',
'file' => __DIR__ . '/logs/bear.log',
],
];
$bearTP = Factory::bearTP($config);
$bearTP->getPreAuthorizationUrl(string $callbackUrl);
$bearTP->handleAuthorize(string $authorization_code);
$bear = $bearTP->bear(string $client_id, string $refresh_token);
$bear->getAuthorizer();