blob: 5fe21940b042e22cad1bea431a8621fcd5447acd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<?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;
}
|