choose config
This commit is contained in:
parent
dbd29c82fd
commit
2d905e35a2
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user