-class RequesttokenAction extends Action {
-
- function is_readonly() {
- return false;
- }
-
- function handle($args) {
- parent::handle($args);
- try {
- common_remove_magic_from_request();
- $req = OAuthRequest::from_request();
- $server = omb_oauth_server();
- $token = $server->fetch_request_token($req);
- print $token;
- } catch (OAuthException $e) {
- common_server_error($e->getMessage());
- }
- }
+/**
+ * Request token action class.
+ *
+ * @category Action
+ * @package StatusNet
+ * @author Evan Prodromou <evan@status.net>
+ * @author Robin Millette <millette@status.net>
+ * @license http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
+ * @link http://status.net/
+ */
+class RequesttokenAction extends Action
+{
+ /**
+ * 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('POST', common_local_url('requesttoken'));
+ $server = omb_oauth_server();
+ $token = $server->fetch_request_token($req);
+ print $token.'&omb_version='.OMB_VERSION_01;
+ } catch (OAuthException $e) {
+ $this->serverError($e->getMessage());
+ }
+ }