diff options
author | Fabio Comuni <fabrix.xm@gmail.com> | 2011-11-02 09:54:07 +0100 |
---|---|---|
committer | Fabio Comuni <fabrix.xm@gmail.com> | 2011-11-02 09:54:07 +0100 |
commit | 69e41f7703bff03dc88e7181961a717ae41330c4 (patch) | |
tree | 57b45681f2fa3608bacd76159ad95b425ef0e07e /mod | |
parent | ff7fc68382bf1359adc31bd65bb6786b7f63e31a (diff) | |
download | volse-hubzilla-69e41f7703bff03dc88e7181961a717ae41330c4.tar.gz volse-hubzilla-69e41f7703bff03dc88e7181961a717ae41330c4.tar.bz2 volse-hubzilla-69e41f7703bff03dc88e7181961a717ae41330c4.zip |
oauth: authorize view, wrong verifier.
Diffstat (limited to 'mod')
-rw-r--r-- | mod/api.php | 11 | ||||
-rw-r--r-- | mod/settings.php | 1 |
2 files changed, 4 insertions, 8 deletions
diff --git a/mod/api.php b/mod/api.php index bc5de0340..5903caee6 100644 --- a/mod/api.php +++ b/mod/api.php @@ -52,18 +52,15 @@ function api_content(&$a) { $app = oauth_get_client(); if (is_null($app)) return "Invalid request. Unknown token."; $consumer = new OAuthConsumer($app['key'], $app['secret']); - - // Rev A change - $request = OAuthRequest::from_request(); - $callback = $request->get_parameter('oauth_callback'); - $datastore = new FKOAuthDataStore(); - $new_token = $datastore->new_request_token($consumer, $callback); + + $verifier = md5($app['secret'].local_user()); + set_pconfig(local_user(), "oauth", "verifier", $verifier); $tpl = get_markup_template("oauth_authorize_done.tpl"); $o = replace_macros($tpl, array( '$title' => t('Authorize application connection'), '$info' => t('Return to your app and insert this Securty Code:'), - '$code' => $new_token->key, + '$code' => $verifier, )); return $o; diff --git a/mod/settings.php b/mod/settings.php index da2b57cd5..ca9b4bd54 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -362,7 +362,6 @@ function settings_content(&$a) { $o .= replace_macros($tpl, array( '$title' => t('Connected Apps'), '$tabs' => $tabs, - '$settings_addons' => $settings_addons )); return $o; |