32 lines
667 B
PHP
32 lines
667 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
require_once dirname(__DIR__) . '/src/App/bootstrap.php';
|
|
|
|
use App\App;
|
|
use App\ConfigLoader;
|
|
use App\KeycloakAuth;
|
|
|
|
session_start();
|
|
|
|
$projectRoot = dirname(__DIR__);
|
|
$keycloakConfig = ConfigLoader::load($projectRoot, 'keycloak');
|
|
$auth = new KeycloakAuth($keycloakConfig);
|
|
|
|
if (!$auth->shouldShowDesktop()) {
|
|
if ($auth->isConfigured()) {
|
|
header('Location: /auth/keycloak', true, 302);
|
|
exit;
|
|
}
|
|
|
|
http_response_code(503);
|
|
echo 'Keycloak ist nicht konfiguriert.';
|
|
exit;
|
|
}
|
|
|
|
$app = new App($projectRoot);
|
|
$desktopPayload = $app->desktopPayload();
|
|
|
|
require $projectRoot . '/partials/desktop/shell.php';
|