4 * Request token action class.
10 * @author Evan Prodromou <evan@controlyourself.ca>
11 * @author Robin Millette <millette@controlyourself.ca>
12 * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
13 * @link http://laconi.ca/
15 * Laconica - a distributed open-source microblogging tool
16 * Copyright (C) 2008, 2009, Control Yourself, Inc.
18 * This program is free software: you can redistribute it and/or modify
19 * it under the terms of the GNU Affero General Public License as published by
20 * the Free Software Foundation, either version 3 of the License, or
21 * (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU Affero General Public License for more details.
28 * You should have received a copy of the GNU Affero General Public License
29 * along with this program. If not, see <http://www.gnu.org/licenses/>.
32 if (!defined('LACONICA')) {
36 require_once INSTALLDIR.'/lib/omb.php';
39 * Request token action class.
43 * @author Evan Prodromou <evan@controlyourself.ca>
44 * @author Robin Millette <millette@controlyourself.ca>
45 * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
46 * @link http://laconi.ca/
48 class RequesttokenAction extends Action
53 * @return boolean false
55 function isReadOnly($args)
63 * @param array $args array of arguments
67 function handle($args)
69 parent::handle($args);
71 common_remove_magic_from_request();
72 $req = OAuthRequest::from_request('POST', common_local_url('requesttoken'));
73 $server = omb_oauth_server();
74 $token = $server->fetch_request_token($req);
76 } catch (OAuthException $e) {
77 $this->serverError($e->getMessage());