You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nextcloud-server/settings/oauth.php

44 lines
810 B

<?php
/**
* Copyright (c) 2012, Tom Needham <tom@owncloud.com>
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*/
require_once('../lib/base.php');
// Logic
$operation = isset($_GET['operation']) ? $_GET['operation'] : '';
switch($operation){
case 'register':
break;
case 'request_token':
break;
case 'authorise';
OC_Util::checkLoggedIn();
// Example
$consumer = array(
'name' => 'Firefox Bookmark Sync',
'scopes' => array('bookmarks'),
);
$t = new OC_Template('settings', 'oauth', 'guest');
OC_Util::addStyle('settings', 'oauth');
$t->assign('consumer', $consumer);
$t->printPage();
break;
case 'access_token';
break;
default:
// Something went wrong
header('Location: /');
break;
}