3
* Xibo - Digital Signage - http://www.xibo.org.uk
4
* Copyright (C) 2015 Spring Signage Ltd
6
* This file (api.php) is part of Xibo.
8
* Xibo is free software: you can redistribute it and/or modify
9
* it under the terms of the GNU Affero General Public License as published by
10
* the Free Software Foundation, either version 3 of the License, or
13
* Xibo is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Affero General Public License for more details.
18
* You should have received a copy of the GNU Affero General Public License
19
* along with Xibo. If not, see <http://www.gnu.org/licenses/>.
23
require 'lib/autoload.php';
24
require 'vendor/autoload.php';
26
// Classes we need to deprecate
27
require 'lib/app/kit.class.php';
28
require 'config/config.class.php';
29
require 'lib/app/translationengine.class.php';
30
require 'lib/app/session.class.php';
33
if (!file_exists('settings.php'))
34
die('Not configured');
38
$app = new \Slim\Slim(array(
42
$app->add(new \Xibo\Middleware\Storage());
43
$app->add(new \Xibo\Middleware\State());
46
/*$sessionStorage = new Storage\SessionStorage();
47
$accessTokenStorage = new Storage\AccessTokenStorage();
48
$clientStorage = new Storage\ClientStorage();
49
$scopeStorage = new Storage\ScopeStorage();
51
$server = new \League\OAuth2\Server\ResourceServer(
58
$app->add(new \Xibo\Middleware\ApiAuthenticationOAuth($server));*/
60
$app->view(new JsonApiView());
61
$app->add(new JsonApiMiddleware());
64
// this should be injected by the ApiAuthenticationOAuth middleware
65
$app->user = \Xibo\Factory\UserFactory::getById(1);
68
require 'lib/routes.php';
b'\\ No newline at end of file'