exit(1);
}
-require_once INSTALLDIR . '/lib/apioauth.php';
-
/**
* Issue temporary OAuth credentials (a request token)
*
* @license http://www.fsf.org/licensing/licenses/agpl-3.0.html GNU Affero General Public License version 3.0
* @link http://status.net/
*/
-
-class ApiOauthRequestTokenAction extends ApiOauthAction
+class ApiOAuthRequestTokenAction extends ApiOAuthAction
{
/**
* Take arguments for running
* @param array $args $_REQUEST args
*
* @return boolean success flag
- *
*/
-
- function prepare($args)
+ function prepare(array $args = array())
{
parent::prepare($args);
*
* @return void
*/
-
- function handle($args)
+ function handle()
{
- parent::handle($args);
+ parent::handle();
- $datastore = new ApiStatusNetOAuthDataStore();
+ $datastore = new ApiGNUsocialOAuthDataStore();
$server = new OAuthServer($datastore);
$hmac_method = new OAuthSignatureMethod_HMAC_SHA1();
/*
* Display temporary OAuth credentials
*/
-
function showRequestToken($token)
{
header('Content-Type: application/x-www-form-urlencoded');
*
* @return boolean true or false
*/
-
function verifyCallback($callback)
{
if ($callback == "oob") {
return true;
} else {
- return Validate::uri(
- $callback,
- array('allowed_schemes' => array('http', 'https'))
- );
+ return filter_var($callback, FILTER_VALIDATE_URL);
}
}
-
}