diff --git a/src/PdAuth/OAuth.php b/src/PdAuth/OAuth.php index f36fd3f..12b351f 100644 --- a/src/PdAuth/OAuth.php +++ b/src/PdAuth/OAuth.php @@ -18,11 +18,24 @@ class OAuth $this->secret = $config['secret']; } + /** + * 选择配置 应对同一项目引入多个pdauth + * @param $config + */ + public function choose($config) + { + $this->host = $config['host']; + $this->id = $config['appid']; + $this->secret = $config['secret']; + } + /** * 生成授权的链接 * @param $redirect * @return string */ + + public function connect($redirect) { $redirect = urlencode($redirect);