use EaseBaidu\Factory;
$config = [
'client_id' => 'xxx',
'token' => 'xxx',
'app_key' => 'xxx',
'aes_key' => 'xxx',
'log' => [
'name' => 'EaseBaidu',
'level' => 'debug',
'file' => __DIR__ . '/logs/smarttp.log',
]
];
$smartTP = Factory::smartProgram($config);
$smartTP->getPreAuthorizationUrl(string $callbackUrl);
$smartTP->handleAuthorize(string $code = null);
$smartTP->getAuthorizer(string $access_token);