diff --git a/config/apps.php b/config/apps.php index 0683ab59..7d8c4f84 100644 --- a/config/apps.php +++ b/config/apps.php @@ -74,7 +74,7 @@ return [ 'app_id' => 'desktop-login', 'title' => 'Desktop Login', 'icon' => 'DL', - 'entry_route' => '/auth/login', + 'entry_route' => '/auth/keycloak', 'window_mode' => 'modal', 'default_width' => 460, 'default_height' => 320, diff --git a/public/admin/ldap-test/index.php b/public/admin/ldap-test/index.php index 9e696b77..f0e3f232 100644 --- a/public/admin/ldap-test/index.php +++ b/public/admin/ldap-test/index.php @@ -1,3 +1,6 @@ shouldShowDesktop()) { - header('Location: /auth/login', true, 302); + header('Location: /auth/keycloak', true, 302); exit; } diff --git a/public/auth/callback/index.php b/public/auth/callback/index.php index 4660ec92..dd64ffb4 100644 --- a/public/auth/callback/index.php +++ b/public/auth/callback/index.php @@ -74,7 +74,7 @@ if ($state === '' || $expectedState === '' || !hash_equals($expectedState, $stat
= htmlspecialchars($message, ENT_QUOTES) ?>
diff --git a/public/auth/forgot-password/index.php b/public/auth/forgot-password/index.php index bc92df54..dc633f8a 100644 --- a/public/auth/forgot-password/index.php +++ b/public/auth/forgot-password/index.php @@ -57,7 +57,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { diff --git a/public/auth/keycloak/index.php b/public/auth/keycloak/index.php index 7495d485..ce8b1cef 100644 --- a/public/auth/keycloak/index.php +++ b/public/auth/keycloak/index.php @@ -14,7 +14,8 @@ $auth = new KeycloakAuth(ConfigLoader::load($projectRoot, 'keycloak')); $loginUrl = $auth->loginUrl(); if ($loginUrl === null) { - header('Location: /auth/login'); + http_response_code(503); + echo 'Keycloak ist nicht konfiguriert.'; exit; } diff --git a/public/auth/login/index.php b/public/auth/login/index.php index e514ab66..7e81471d 100644 --- a/public/auth/login/index.php +++ b/public/auth/login/index.php @@ -11,18 +11,11 @@ session_start(); $projectRoot = dirname(__DIR__, 3); $auth = new KeycloakAuth(ConfigLoader::load($projectRoot, 'keycloak')); -$previewUrl = $auth->allowDesktopPreview() - ? '/?' . urlencode($auth->previewQueryKey()) . '=1' - : null; -$loginScreen = [ - 'branding' => $auth->branding(), - 'login_url' => $auth->isConfigured() ? '/auth/keycloak' : null, - 'register_url' => '/auth/register', - 'forgot_password_url' => '/auth/forgot-password/', - 'preview_url' => $previewUrl, - 'keycloak_ready' => $auth->isConfigured(), - 'callback_url' => $auth->redirectUri(), -]; +if ($auth->isConfigured()) { + header('Location: /auth/keycloak', true, 302); + exit; +} -require $projectRoot . '/partials/auth/login_screen.php'; +http_response_code(503); +echo 'Keycloak ist nicht konfiguriert.'; diff --git a/public/auth/logout/index.php b/public/auth/logout/index.php index 7e022d29..094edc27 100644 --- a/public/auth/logout/index.php +++ b/public/auth/logout/index.php @@ -24,5 +24,5 @@ if ($logoutUrl !== null) { exit; } -header('Location: /auth/login', true, 302); +header('Location: /auth/keycloak', true, 302); exit; diff --git a/public/auth/register/index.php b/public/auth/register/index.php index d909de34..11ee22aa 100644 --- a/public/auth/register/index.php +++ b/public/auth/register/index.php @@ -33,7 +33,6 @@ $form = [ 'given_name' => '', 'family_name' => '', 'email' => '', - 'note' => '', 'password' => '', 'password_confirm' => '', ]; @@ -44,7 +43,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { 'given_name' => trim((string) ($_POST['given_name'] ?? '')), 'family_name' => trim((string) ($_POST['family_name'] ?? '')), 'email' => trim((string) ($_POST['email'] ?? '')), - 'note' => trim((string) ($_POST['note'] ?? '')), 'password' => (string) ($_POST['password'] ?? ''), 'password_confirm' => (string) ($_POST['password_confirm'] ?? ''), ]; @@ -68,7 +66,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { 'given_name' => '', 'family_name' => '', 'email' => '', - 'note' => '', 'password' => '', 'password_confirm' => '', ]; @@ -138,11 +135,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { - -Das Passwort wird verschlüsselt zwischengespeichert und bei Freigabe direkt für LDAP und SMB gesetzt. Neue Registrierungen erhalten zunächst trotzdem keinen aktiven Desktop-Zugang.
-