upd: public.index (set AuthSystemDefault as default AuthSystem for api.core.Request)

This commit is contained in:
xdrm-brackets 2017-11-26 12:07:28 +01:00
parent 5eeaa1321f
commit e33e6714d7
1 changed files with 6 additions and 3 deletions

View File

@ -2,10 +2,10 @@
use \router\core\Router; use \router\core\Router;
use \database\core\Repo; use \database\core\Repo;
use \api\core\Request;
use \api\core\AuthSystemDefault;
use \database\core\DatabaseDriver; use \database\core\DatabaseDriver;
debug();
/* (1) Start session */ /* (1) Start session */
session_start(); session_start();
$_SESSION['PERM'] = ['journalist']; $_SESSION['PERM'] = ['journalist'];
@ -13,7 +13,10 @@
/* (2) Set default Driver for Repos */ /* (2) Set default Driver for Repos */
Repo::setDriver(DatabaseDriver::get()); Repo::setDriver(DatabaseDriver::get());
/* (3) launch router */ /* (3) Set default AuthSystem */
Request::setAuthSystem(new AuthSystemDefault);
/* (4) launch router */
echo "<pre>"; echo "<pre>";
$MainRouter = Router::launch($_GET['url']); $MainRouter = Router::launch($_GET['url']);