diff options
author | Vincent Petry <pvince81@owncloud.com> | 2017-06-02 17:08:49 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-08-16 11:03:25 +0200 |
commit | 653610559deeaf767ceb4954b26f6d1a75381e77 (patch) | |
tree | 20a4a5dc9e120f0cfcf798dad3e41945fd8aab79 /apps/files_external/ajax | |
parent | 4c558c99f326d4b399cc503c8c1a43e1099ba9d9 (diff) | |
download | nextcloud-server-653610559deeaf767ceb4954b26f6d1a75381e77.tar.gz nextcloud-server-653610559deeaf767ceb4954b26f6d1a75381e77.zip |
Bye bye Dropbox v1
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_external/ajax')
-rw-r--r-- | apps/files_external/ajax/oauth1.php | 74 |
1 files changed, 0 insertions, 74 deletions
diff --git a/apps/files_external/ajax/oauth1.php b/apps/files_external/ajax/oauth1.php deleted file mode 100644 index f0f872c99ff..00000000000 --- a/apps/files_external/ajax/oauth1.php +++ /dev/null @@ -1,74 +0,0 @@ -<?php -/** - * @copyright Copyright (c) 2016, ownCloud, Inc. - * - * @author Jörn Friedrich Dreyer <jfd@butonic.de> - * @author Lukas Reschke <lukas@statuscode.ch> - * @author Michael Gapczynski <GapczynskiM@gmail.com> - * @author Robin Appelman <robin@icewind.nl> - * @author Robin McCorkell <robin@mccorkell.me.uk> - * @author Thomas Müller <thomas.mueller@tmit.eu> - * - * @license AGPL-3.0 - * - * This code is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License, version 3, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License, version 3, - * along with this program. If not, see <http://www.gnu.org/licenses/> - * - */ -require_once __DIR__ . '/../3rdparty/Dropbox/autoload.php'; - -OCP\JSON::checkAppEnabled('files_external'); -OCP\JSON::checkLoggedIn(); -OCP\JSON::callCheck(); -$l = \OC::$server->getL10N('files_external'); - -// FIXME: currently hard-coded to Dropbox OAuth -if (isset($_POST['app_key']) && isset($_POST['app_secret'])) { - $oauth = new Dropbox_OAuth_Curl((string)$_POST['app_key'], (string)$_POST['app_secret']); - if (isset($_POST['step'])) { - switch ($_POST['step']) { - case 1: - try { - if (isset($_POST['callback'])) { - $callback = (string)$_POST['callback']; - } else { - $callback = null; - } - $token = $oauth->getRequestToken(); - OCP\JSON::success(array('data' => array('url' => $oauth->getAuthorizeUrl($callback), - 'request_token' => $token['token'], - 'request_token_secret' => $token['token_secret']))); - } catch (Exception $exception) { - OCP\JSON::error(array('data' => array('message' => - $l->t('Fetching request tokens failed. Verify that your app key and secret are correct.')) - )); - } - break; - case 2: - if (isset($_POST['request_token']) && isset($_POST['request_token_secret'])) { - try { - $oauth->setToken((string)$_POST['request_token'], (string)$_POST['request_token_secret']); - $token = $oauth->getAccessToken(); - OCP\JSON::success(array('access_token' => $token['token'], - 'access_token_secret' => $token['token_secret'])); - } catch (Exception $exception) { - OCP\JSON::error(array('data' => array('message' => - $l->t('Fetching access tokens failed. Verify that your app key and secret are correct.')) - )); - } - } - break; - } - } -} else { - OCP\JSON::error(array('data' => array('message' => $l->t('Please provide a valid app key and secret.')))); -} |