refacotr
This commit is contained in:
@@ -3,8 +3,8 @@ require_once(dirname(__FILE__) . "/OAuthAuthentication.php");
|
|||||||
|
|
||||||
class OAuth10aAuthentication extends OAuthAuthentication {
|
class OAuth10aAuthentication extends OAuthAuthentication {
|
||||||
|
|
||||||
function __construct($consumerKey, $consumerSecret, $redirectUrl) {
|
function __construct($consumerKey, $consumerSecret, $callbackUrl) {
|
||||||
parent::__construct($consumerKey, $consumerSecret, $redirectUrl);
|
parent::__construct($consumerKey, $consumerSecret, $callbackUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleHeaders() {
|
public function handleHeaders() {
|
||||||
|
|||||||
@@ -3,8 +3,8 @@ require_once(dirname(__FILE__) . "/OAuthAuthentication.php");
|
|||||||
|
|
||||||
class OAuth2Authentication extends OAuthAuthentication {
|
class OAuth2Authentication extends OAuthAuthentication {
|
||||||
|
|
||||||
function __construct($consumerKey, $consumerSecret, $redirectUrl) {
|
function __construct($consumerKey, $consumerSecret, $callbackUrl) {
|
||||||
parent::__construct($consumerKey, $consumerSecret, $redirectUrl);
|
parent::__construct($consumerKey, $consumerSecret, $callbackUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function handleParams() {
|
public function handleParams() {
|
||||||
|
|||||||
@@ -5,14 +5,14 @@ class OAuthAuthentication implements Authentication {
|
|||||||
|
|
||||||
protected $consumerKey;
|
protected $consumerKey;
|
||||||
protected $consumerSecret;
|
protected $consumerSecret;
|
||||||
protected $redirectUrl;
|
protected $callbackUrl;
|
||||||
protected $accessToken;
|
protected $accessToken;
|
||||||
protected $accessSecret;
|
protected $accessSecret;
|
||||||
|
|
||||||
function __construct($consumerKey, $consumerSecret, $redirectUrl) {
|
function __construct($consumerKey, $consumerSecret, $callbackUrl) {
|
||||||
$this->consumerKey = $consumerKey;
|
$this->consumerKey = $consumerKey;
|
||||||
$this->consumerSecret = $consumerSecret;
|
$this->consumerSecret = $consumerSecret;
|
||||||
$this->redirectUrl = $redirectUrl;
|
$this->callbackUrl = $callbackUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addAccessToken($accessToken, $accessSecret = null) {
|
public function addAccessToken($accessToken, $accessSecret = null) {
|
||||||
@@ -24,7 +24,7 @@ class OAuthAuthentication implements Authentication {
|
|||||||
$params = array(
|
$params = array(
|
||||||
"consumerKey" => $this->consumerKey,
|
"consumerKey" => $this->consumerKey,
|
||||||
"consumerSecret" => $this->consumerSecret,
|
"consumerSecret" => $this->consumerSecret,
|
||||||
"redirectUrl" => $this->redirectUrl,
|
"callbackUrl" => $this->callbackUrl,
|
||||||
);
|
);
|
||||||
return $params;
|
return $params;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user