diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-08-20 17:13:40 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-08-20 17:13:40 -0400 |
commit | 4b2aa517501037e86e4a3c3bad3f363dcf8a26c6 (patch) | |
tree | df144b5bd3aeb9bfc91c5c4be6bd75a71f1dbd4a /actions/requesttoken.php | |
parent | 8f122dd71efcc54b820629bc4c39efe91b8e8726 (diff) | |
parent | b0bb1fff2e79a01b2fa2eece79d2c644860bbb97 (diff) |
Merge branch '0.9.x' of git@gitorious.org:laconica/mainline into 0.9.x
Diffstat (limited to 'actions/requesttoken.php')
-rw-r--r-- | actions/requesttoken.php | 21 |
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()); } } } - +?> |