summaryrefslogtreecommitdiff
path: root/actions/requesttoken.php
diff options
context:
space:
mode:
authorAdrian Lang <mail@adrianlang.de>2009-08-10 14:48:50 +0200
committerAdrian Lang <mail@adrianlang.de>2009-08-10 14:48:50 +0200
commitec88d2650ea4371cf53229171851747b31587e4b (patch)
tree00c3cd79bced5a5212fab07a97139c9717e1171f /actions/requesttoken.php
parentee9bfa715807cdd352407f3d01bc3126dc777b60 (diff)
Replace own OMB stack with libomb.
Diffstat (limited to 'actions/requesttoken.php')
-rw-r--r--actions/requesttoken.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/actions/requesttoken.php b/actions/requesttoken.php
index 8d1e3f004..8328962f2 100644
--- a/actions/requesttoken.php
+++ b/actions/requesttoken.php
@@ -34,6 +34,7 @@ if (!defined('LACONICA')) {
}
require_once INSTALLDIR.'/lib/omb.php';
+require_once INSTALLDIR.'/extlib/libomb/service_provider.php';
/**
* Request token action class.
@@ -49,17 +50,17 @@ class RequesttokenAction extends Action
{
/**
* Is read only?
- *
+ *
* @return boolean false
*/
- function isReadOnly($args)
+ function isReadOnly()
{
return false;
}
-
+
/**
* Class handler.
- *
+ *
* @param array $args array of arguments
*
* @return void
@@ -68,14 +69,12 @@ class RequesttokenAction extends Action
{
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;
- } catch (OAuthException $e) {
+ $srv = new OMB_Service_Provider(null, omb_oauth_datastore(),
+ omb_oauth_server());
+ $srv->writeRequestToken();
+ } catch (Exception $e) {
$this->serverError($e->getMessage());
}
}
}
-
+?>