X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Frequesttoken.php;h=8d1e3f004342ea399a9a35efb80386b57063bc58;hb=84fb84693994ba05a642d105a57227df7b412466;hp=5058deedb5a55b23c2a9ce990a7129bc4704a316;hpb=4b9df58c90e25ea79aeec64c6e96f828fe06d7df;p=quix0rs-gnu-social.git diff --git a/actions/requesttoken.php b/actions/requesttoken.php index 5058deedb5..8d1e3f0043 100644 --- a/actions/requesttoken.php +++ b/actions/requesttoken.php @@ -1,7 +1,19 @@ + * @author Robin Millette + * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 + * @link http://laconi.ca/ + * * Laconica - a distributed open-source microblogging tool - * Copyright (C) 2008, Controlez-Vous, Inc. + * Copyright (C) 2008, 2009, Control Yourself, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -17,29 +29,53 @@ * along with this program. If not, see . */ -if (!defined('LACONICA')) { exit(1); } +if (!defined('LACONICA')) { + exit(1); +} -require_once(INSTALLDIR.'/lib/omb.php'); +require_once INSTALLDIR.'/lib/omb.php'; +/** + * Request token action class. + * + * @category Action + * @package Laconica + * @author Evan Prodromou + * @author Robin Millette + * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3 + * @link http://laconi.ca/ + */ class RequesttokenAction extends Action { - - function isReadOnly() + /** + * Is read only? + * + * @return boolean false + */ + function isReadOnly($args) { return false; } + /** + * Class handler. + * + * @param array $args array of arguments + * + * @return void + */ function handle($args) { parent::handle($args); try { common_remove_magic_from_request(); - $req = OAuthRequest::from_request(); + $req = OAuthRequest::from_request('POST', common_local_url('requesttoken')); $server = omb_oauth_server(); - $token = $server->fetch_request_token($req); + $token = $server->fetch_request_token($req); print $token; } catch (OAuthException $e) { $this->serverError($e->getMessage()); } } } +