keycloak
All checks were successful
Deploy / deploy-staging (push) Successful in 46s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-06-08 02:45:36 +02:00
parent 6d398323ae
commit 1ae7b98378
14 changed files with 1036 additions and 4 deletions

View File

@@ -5,8 +5,35 @@ declare(strict_types=1);
require_once dirname(__DIR__) . '/src/App/bootstrap.php';
use App\App;
use App\ConfigLoader;
use App\KeycloakAuth;
$app = new App(dirname(__DIR__));
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 dirname(__DIR__) . '/partials/desktop/shell.php';
require $projectRoot . '/partials/desktop/shell.php';