'User', 'preferred_username' => 'user@localhost']; $ssoEnabled = false; try { if (file_exists(__DIR__ . '/AuthMiddleware.php')) { require_once 'AuthMiddleware.php'; $auth = new AuthMiddleware(); $user = $auth->requireAuth(); // Blocks if not authenticated $ssoEnabled = $auth->isSSOEnabled(); } } catch (Exception $e) { // Log error but don't block app error_log("Auth error (app will continue without auth): " . $e->getMessage()); } // Read and serve the UI HTML $uiContent = file_get_contents(__DIR__ . '/ui.html'); // Extract the body content from ui.html preg_match('/(.*?)<\/body>/s', $uiContent, $bodyMatches); $bodyContent = $bodyMatches[1] ?? ''; // Extract the style content from ui.html preg_match('/
Logged in as