OAuth 1.0a and 2 support

This commit is contained in:
Evan Seguin
2012-10-02 15:59:55 -07:00
parent 0e6e912176
commit 33ba91700b
11 changed files with 125 additions and 16 deletions

View File

@@ -0,0 +1,24 @@
<?php
require_once(dirname(__FILE__) . "/OAuthAuthentication.php");
class OAuth2Authentication extends OAuthAuthentication {
function __construct($consumerKey, $consumerSecret, $redirectUrl) {
parent::__construct($consumerKey, $consumerSecret, $redirectUrl);
}
public function handleParams() {
if ($this->accessToken == null) {
throw new MashapeClientException(
EXCEPTION_OAUTH2_AUTHORIZE,
EXCEPTION_OAUTH2_AUTHORIZE_CODE);
}
$params = array("accesstoken" => $this->accessToken);
return $params;
}
}
?>