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

@@ -30,6 +30,11 @@ final class App
$apps = AppIconResolver::decorate($registry->all(), $activeSkin);
$windows = (new WindowManager($registry))->defaultWindows();
$activeWidgetIds = DesktopState::defaultWidgetIds();
$isAuthenticated = isset($_SESSION['desktop_auth']) && is_array($_SESSION['desktop_auth']);
$authUser = $isAuthenticated && is_array($_SESSION['desktop_auth']['user'] ?? null)
? $_SESSION['desktop_auth']['user']
: [];
$displayName = (string) ($authUser['name'] ?? $authUser['username'] ?? 'Gast');
return [
'meta' => [
@@ -45,9 +50,14 @@ final class App
'storage_scope' => 'guest',
'workspace' => DesktopState::defaultWorkspace(),
'login' => [
'authenticated' => false,
'mode' => 'public-home',
'authenticated' => $isAuthenticated,
'mode' => $isAuthenticated ? 'authenticated' : 'login-required',
'keycloak_theme_handoff' => '/docs/keycloak-theme-handoff.md',
'user' => [
'name' => (string) ($authUser['name'] ?? ''),
'username' => (string) ($authUser['username'] ?? ''),
'email' => (string) ($authUser['email'] ?? ''),
],
],
],
'apps' => $apps,
@@ -58,6 +68,9 @@ final class App
'active_ids' => $activeWidgetIds,
],
'tray' => DesktopState::trayItems(),
'session' => [
'display_name' => $displayName,
],
'menu' => [
'quick_actions' => DesktopState::quickActions(),
],