diff --git a/src/MaxCDN/OAuth/OAuthConsumer.php b/src/MaxCDN/OAuth/OAuthConsumer.php index b016369..3d2ff75 100644 --- a/src/MaxCDN/OAuth/OAuthConsumer.php +++ b/src/MaxCDN/OAuth/OAuthConsumer.php @@ -8,13 +8,13 @@ class OAuthConsumer { public $key; public $secret; - function __construct($key, $secret, $callback_url=NULL) { + public function __construct($key, $secret, $callback_url=NULL) { $this->key = $key; $this->secret = $secret; $this->callback_url = $callback_url; } - function __toString() { + public function __toString() { return "\\MaxCDN\\OAuth\\OAuthConsumer[key=$this->key,secret=$this->secret]"; } } diff --git a/src/MaxCDN/OAuth/OAuthDataStore.php b/src/MaxCDN/OAuth/OAuthDataStore.php index c3fb037..54ee4dd 100644 --- a/src/MaxCDN/OAuth/OAuthDataStore.php +++ b/src/MaxCDN/OAuth/OAuthDataStore.php @@ -2,23 +2,23 @@ namespace MaxCDN\OAuth; class OAuthDataStore { - function lookup_consumer($consumer_key) { + public function lookup_consumer($consumer_key) { // implement me } - function lookup_token($consumer, $token_type, $token) { + public function lookup_token($consumer, $token_type, $token) { // implement me } - function lookup_nonce($consumer, $token, $nonce, $timestamp) { + public function lookup_nonce($consumer, $token, $nonce, $timestamp) { // implement me } - function new_request_token($consumer, $callback = null) { + public function new_request_token($consumer, $callback = null) { // return a new token attached to this consumer } - function new_access_token($token, $consumer, $verifier = null) { + public function new_access_token($token, $consumer, $verifier = null) { // return a new access token attached to this consumer // for the user associated with this token if the request token // is authorized diff --git a/src/MaxCDN/OAuth/OAuthSignatureMethod_HMAC_SHA1.php b/src/MaxCDN/OAuth/OAuthSignatureMethod_HMAC_SHA1.php index 5f413cc..02b57b6 100644 --- a/src/MaxCDN/OAuth/OAuthSignatureMethod_HMAC_SHA1.php +++ b/src/MaxCDN/OAuth/OAuthSignatureMethod_HMAC_SHA1.php @@ -9,7 +9,7 @@ namespace MaxCDN\OAuth; class OAuthSignatureMethod_HMAC_SHA1 extends OAuthSignatureMethod { - function get_name() { + public function get_name() { return "HMAC-SHA1"; } diff --git a/src/MaxCDN/OAuth/OAuthToken.php b/src/MaxCDN/OAuth/OAuthToken.php index 4c852eb..cad0e7f 100644 --- a/src/MaxCDN/OAuth/OAuthToken.php +++ b/src/MaxCDN/OAuth/OAuthToken.php @@ -13,7 +13,7 @@ class OAuthToken { * key = the token * secret = the token secret */ - function __construct($key, $secret) { + public function __construct($key, $secret) { $this->key = $key; $this->secret = $secret; } @@ -22,14 +22,14 @@ function __construct($key, $secret) { * generates the basic string serialization of a token that a server * would respond to request_token and access_token calls with */ - function to_string() { + protected function to_string() { return "oauth_token=" . OAuthUtil::urlencode_rfc3986($this->key) . "&oauth_token_secret=" . OAuthUtil::urlencode_rfc3986($this->secret); } - function __toString() { + public function __toString() { return $this->to_string(); } }