X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Frequesttoken.php;h=9507e3d6c9c3a2c897276d31a794188a1620d0bb;hb=b4e649fe906a793cd5e62d6390065ea5d41c40db;hp=378db4403050e6eb3729e4904d1bce24e5fa7ee7;hpb=4b0cf99e56f965e10eeb8b8b19e7b405bda49eaf;p=quix0rs-gnu-social.git diff --git a/actions/requesttoken.php b/actions/requesttoken.php index 378db44030..9507e3d6c9 100644 --- a/actions/requesttoken.php +++ b/actions/requesttoken.php @@ -1,5 +1,17 @@ + * @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. * @@ -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 is_readonly() + /** + * 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()); } } } +