Files
unirest-php/main/mashape/authentication/OAuth2Authentication.php
2012-10-02 15:59:55 -07:00

25 lines
536 B
PHP

<?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;
}
}
?>