本文整理汇总了PHP中Hybrid_Provider_Model_OAuth1类的典型用法代码示例。如果您正苦于以下问题:PHP Hybrid_Provider_Model_OAuth1类的具体用法?PHP Hybrid_Provider_Model_OAuth1怎么用?PHP Hybrid_Provider_Model_OAuth1使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Hybrid_Provider_Model_OAuth1类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
/**
* IDp wrappers initializer
*/
function initialize()
{
parent::initialize();
// provider api end-points
$this->api->api_base_url = "https://identi.ca/api/";
$this->api->authorize_url = "https://identi.ca/api/oauth/authorize";
$this->api->request_token_url = "https://identi.ca/api/oauth/request_token";
$this->api->access_token_url = "https://identi.ca/api/oauth/access_token";
}
示例2: initialize
/**
* IDp wrappers initializer
*/
function initialize()
{
parent::initialize();
// Provider api end-points
$this->api->api_endpoint_url = "http://api.myspace.com/v1/";
$this->api->authorize_url = "http://api.myspace.com/authorize";
$this->api->request_token_url = "http://api.myspace.com/request_token";
$this->api->access_token_url = "http://api.myspace.com/access_token";
}
示例3: initialize
function initialize()
{
parent::initialize();
// Provider api end-points
$this->api->api_base_url = 'http://api.murmur.tw/1/';
$this->api->authorize_url = 'http://api.murmur.tw/oauth/authorize';
$this->api->request_token_url = 'http://api.murmur.tw/oauth/request_token';
$this->api->access_token_url = 'http://api.murmur.tw/oauth/access_token';
}
示例4: initialize
/**
* IDp wrappers initializer
*/
function initialize()
{
parent::initialize();
// provider api end-points
$this->api->api_base_url = "https://bitbucket.org/api/1.0/";
$this->api->authorize_url = "https://bitbucket.org/api/1.0/oauth/authenticate";
$this->api->request_token_url = "https://bitbucket.org/api/1.0/oauth/request_token";
$this->api->access_token_url = "https://bitbucket.org/api/1.0/oauth/access_token";
$this->api->curl_auth_header = false;
}
示例5: initialize
/**
* IDp wrappers initializer
*/
function initialize()
{
parent::initialize();
// Provider api end-points
$this->api->api_base_url = 'http://api.rdio.com/1/';
$this->api->authorize_url = 'https://www.rdio.com/oauth/authorize';
$this->api->request_token_url = 'http://api.rdio.com/oauth/request_token';
$this->api->access_token_url = 'http://api.rdio.com/oauth/access_token';
$this->api->curl_authenticate_method = "POST";
}
示例6: initialize
/**
* IDp wrappers initializer
*/
function initialize()
{
parent::initialize();
// provider api end-points
$this->api->api_base_url = "https://api.500px.com/v1/";
$this->api->authorize_url = "https://api.500px.com/v1/oauth/authorize";
$this->api->request_token_url = "https://api.500px.com/v1/oauth/request_token";
$this->api->access_token_url = "https://api.500px.com/v1/oauth/access_token";
$this->api->curl_auth_header = false;
}
示例7: initialize
/**
* IDp wrappers initializer
*/
function initialize()
{
parent::initialize();
// provider api end-points
$this->api->api_base_url = "http://www.goodreads.com/";
$this->api->authorize_url = "http://www.goodreads.com/oauth/authorize";
$this->api->request_token_url = "http://www.goodreads.com/oauth/request_token";
$this->api->access_token_url = "http://www.goodreads.com/oauth/access_token";
// turn off json parsing!
$this->api->decode_json = false;
}
示例8: initialize
function initialize()
{
// Use Beijing Timezone
date_default_timezone_set('Etc/GMT-8');
parent::initialize();
// Provider api end-points
$this->api->api_base_url = 'http://open.t.qq.com/api/';
$this->api->authorize_url = 'https://open.t.qq.com/cgi-bin/authorize';
$this->api->request_token_url = 'https://open.t.qq.com/cgi-bin/request_token';
$this->api->access_token_url = 'https://open.t.qq.com/cgi-bin/access_token';
}
示例9: initialize
function initialize()
{
parent::initialize();
// Provider api end-points
$this->api->api_base_url = 'http://emma.pixnet.cc/';
$this->api->authorize_url = 'http://emma.pixnet.cc/oauth/authorize';
$this->api->request_token_url = 'http://emma.pixnet.cc/oauth/request_token';
$this->api->access_token_url = 'http://emma.pixnet.cc/oauth/access_token';
// for access_token need to POST data instead of using GET
$this->api->access_token_method = 'POST';
}
示例10: initialize
function initialize()
{
parent::initialize();
// Provider api end-points
$this->api->api_base_url = 'http://www.plurk.com/APP/';
$this->api->authorize_url = 'http://www.plurk.com/OAuth/authorize';
$this->api->request_token_url = 'http://www.plurk.com/OAuth/request_token';
$this->api->access_token_url = 'http://www.plurk.com/OAuth/access_token';
// for Plurk we need to POST data instead of using GET
$this->api->request_token_method = 'POST';
$this->api->access_token_method = 'POST';
}
示例11: initialize
/**
* IDp wrappers initializer
*/
function initialize()
{
parent::initialize();
// Provider api end-points
$this->api->api_base_url = "https://api.twitter.com/1.1/";
$this->api->authorize_url = "https://api.twitter.com/oauth/authenticate";
$this->api->request_token_url = "https://api.twitter.com/oauth/request_token";
$this->api->access_token_url = "https://api.twitter.com/oauth/access_token";
if (isset($this->config['api_version']) && $this->config['api_version']) {
$this->api->api_base_url = "https://api.twitter.com/{$this->config['api_version']}/";
}
if (isset($this->config['authorize']) && $this->config['authorize']) {
$this->api->authorize_url = "https://api.twitter.com/oauth/authorize";
}
$this->api->curl_auth_header = false;
}
示例12: initialize
/**
* Initialize.
*/
function initialize()
{
if (!$this->config['keys']['key'] || !$this->config['keys']['secret']) {
throw new Exception('You need a consumer key and secret to connect to ' . $this->providerId . '.');
}
parent::initialize();
// XING API endpoints.
$this->api->api_base_url = 'https://api.xing.com/v1/';
$this->api->authorize_url = 'https://api.xing.com/v1/authorize';
$this->api->request_token_url = 'https://api.xing.com/v1/request_token';
$this->api->access_token_url = 'https://api.xing.com/v1/access_token';
// Currently there is only version "v1" available.
if (isset($this->config['api_version']) && $this->config['api_version']) {
$this->api->api_base_url = 'https://api.xing.com/' . $this->config['api_version'] . '/';
}
// We don't need them.
$this->api->curl_auth_header = false;
}
示例13: loginFinish
/**
* {@inheritdoc}
*/
public function loginFinish()
{
// in case we are completing a Reverse Auth flow; cf. https://dev.twitter.com/docs/ios/using-reverse-auth
if (isset($_REQUEST['oauth_token_secret'])) {
$tokens = $_REQUEST;
$this->access_tokens_raw = $tokens;
// we should have an access_token unless something has gone wrong
if (!isset($tokens["oauth_token"])) {
throw new Exception("Authentication failed! {$this->providerId} returned an invalid access token.", 5);
}
// Get rid of tokens we don't need
$this->deleteToken("request_token");
$this->deleteToken("request_token_secret");
// Store access_token and secret for later use
$this->token("access_token", $tokens['oauth_token']);
$this->token("access_token_secret", $tokens['oauth_token_secret']);
// set user as logged in to the current provider
$this->setUserConnected();
return;
}
parent::loginFinish();
}