Merge branch 'feature/choose' into 'master'
choose config See merge request arch/php-auth-client!1
This commit is contained in:
commit
e5648a557c
|
@ -18,11 +18,24 @@ class OAuth
|
||||||
$this->secret = $config['secret'];
|
$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
|
* @param $redirect
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
public function connect($redirect)
|
public function connect($redirect)
|
||||||
{
|
{
|
||||||
$redirect = urlencode($redirect);
|
$redirect = urlencode($redirect);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user