添加了card.westgis.ac.cn的科技网通行证Appkey和Appsecret
This commit is contained in:
parent
eb98d79dfc
commit
35c0883355
|
@ -50,8 +50,13 @@ class Source
|
||||||
"code"=>"code"
|
"code"=>"code"
|
||||||
);
|
);
|
||||||
|
|
||||||
if($this->website == 'westdc'){
|
//新浪微博(新浪通行证)
|
||||||
|
$this->source->sina = new stdClass();
|
||||||
|
$this->source->sina->param = array(
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
if($this->website == 'westdc'){
|
||||||
$this->source->escience->config = array(
|
$this->source->escience->config = array(
|
||||||
'id' => '71852',
|
'id' => '71852',
|
||||||
'secret' => 'ad7gd3jZgbzhQM6vIh9vPnQFZQoTGHZI',
|
'secret' => 'ad7gd3jZgbzhQM6vIh9vPnQFZQoTGHZI',
|
||||||
|
@ -61,11 +66,9 @@ class Source
|
||||||
'theme'=>'full'
|
'theme'=>'full'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->website == 'heihedata'){
|
if($this->website == 'heihedata'){
|
||||||
|
|
||||||
$this->source->escience->config = array(
|
$this->source->escience->config = array(
|
||||||
'id' => '78969',
|
'id' => '78969',
|
||||||
'secret' => 'iTGKdCkUPakA2hza2TJ4XZ4cnwlh8Hqz',
|
'secret' => 'iTGKdCkUPakA2hza2TJ4XZ4cnwlh8Hqz',
|
||||||
|
@ -75,9 +78,48 @@ class Source
|
||||||
'theme'=>'full'
|
'theme'=>'full'
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if($this->website == 'card'){
|
||||||
|
$this->source->escience->config = array(
|
||||||
|
'id' => '58176',
|
||||||
|
'secret' => 'ZM5dEFX5GpJC62IcJ3iajx51T9hzhJkQ',
|
||||||
|
'index' => 'http://card.westgis.ac.cn/',
|
||||||
|
'callback' => 'http://card.westgis.ac.cn/account/callback/type/escience',
|
||||||
|
'other' => array(
|
||||||
|
'theme'=>'full'
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Oauth2登录目标
|
||||||
|
/*
|
||||||
|
name : 名称
|
||||||
|
code : 获取code的url
|
||||||
|
token : 获取 token的url
|
||||||
|
code_response : 获取token时使用的参数值(配合$this->source->OBJECTIVE->param中的code_response使用
|
||||||
|
grant_type : 获得token的认证方式,按照oauth2标准,应该是authorization_code
|
||||||
|
*/
|
||||||
|
private function initTarget(){
|
||||||
|
//中国科技网通行证
|
||||||
|
$this->target->escience = array(
|
||||||
|
'name' => '中国科技网通行证',
|
||||||
|
'code' => 'http://passport.escience.cn/oauth2/authorize',
|
||||||
|
'token' => 'https://passport.escience.cn/oauth2/token',
|
||||||
|
'code_response' => 'code',
|
||||||
|
'grant_type' => 'authorization_code',
|
||||||
|
);
|
||||||
|
|
||||||
|
//新浪
|
||||||
|
$this->target->sina = array(
|
||||||
|
'name' => '新浪微博',
|
||||||
|
'code' => 'https://api.weibo.com/oauth2/authorize',
|
||||||
|
'token' => '',
|
||||||
|
'code_response' => 'code',
|
||||||
|
'grant_type' => 'authorization_code'
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//获得一个源
|
//获得一个源
|
||||||
|
@ -96,17 +138,6 @@ class Source
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Oauth2登录目标
|
|
||||||
private function initTarget(){
|
|
||||||
$this->target->escience = array(
|
|
||||||
'name' => '中国科技网通行证',
|
|
||||||
'code' => 'http://passport.escience.cn/oauth2/authorize',
|
|
||||||
'token' => 'https://passport.escience.cn/oauth2/token',
|
|
||||||
'code_response' => 'code',
|
|
||||||
'grant_type' => 'authorization_code',
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
//获得Oauth2登录模板
|
//获得Oauth2登录模板
|
||||||
public function getTarget($type = "")
|
public function getTarget($type = "")
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue