Files
desktop/public/index.php
Lars Gebhardt-Kusche 1ae7b98378
All checks were successful
Deploy / deploy-staging (push) Successful in 46s
Deploy / deploy-production (push) Has been skipped
keycloak
2026-06-08 02:45:36 +02:00

40 lines
970 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()) {
$previewUrl = null;
if ($auth->allowDesktopPreview()) {
$previewUrl = '/?' . urlencode($auth->previewQueryKey()) . '=1';
}
$loginScreen = [
'branding' => $auth->branding(),
'login_url' => $auth->isConfigured() ? '/auth/keycloak' : null,
'preview_url' => $previewUrl,
'keycloak_ready' => $auth->isConfigured(),
'callback_url' => $auth->redirectUri(),
];
require $projectRoot . '/partials/auth/login_screen.php';
exit;
}
$app = new App($projectRoot);
$desktopPayload = $app->desktopPayload();
require $projectRoot . '/partials/desktop/shell.php';