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

This commit is contained in:
2026-06-15 02:38:41 +02:00
parent 46d1e624b9
commit 823c5d197d
10 changed files with 23 additions and 47 deletions

View File

@@ -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,

View File

@@ -1,3 +1,6 @@
<?php
declare(strict_types=1);
http_response_code(404);
echo 'LDAP-Test ist deaktiviert.';
exit;

View File

@@ -13,7 +13,7 @@ $projectRoot = dirname(__DIR__, 3);
$auth = new KeycloakAuth(ConfigLoader::load($projectRoot, 'keycloak'));
if (!$auth->shouldShowDesktop()) {
header('Location: /auth/login', true, 302);
header('Location: /auth/keycloak', true, 302);
exit;
}

View File

@@ -74,7 +74,7 @@ if ($state === '' || $expectedState === '' || !hash_equals($expectedState, $stat
<p class="login-copy"><?= htmlspecialchars($message, ENT_QUOTES) ?></p>
</div>
<div class="login-actions">
<a class="login-button login-button-secondary" href="/auth/login">Zurueck zum Login</a>
<a class="login-button login-button-secondary" href="/auth/keycloak">Zurueck zum Login</a>
</div>
</section>
</main>

View File

@@ -57,7 +57,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
<div class="login-actions">
<button class="login-button login-button-primary" type="submit">Reset-Link senden</button>
<a class="login-button login-button-secondary" href="/auth/login">Zurück zum Login</a>
<a class="login-button login-button-secondary" href="/auth/keycloak">Zurück zum Login</a>
</div>
</form>
</section>

View File

@@ -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;
}

View File

@@ -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.';

View File

@@ -24,5 +24,5 @@ if ($logoutUrl !== null) {
exit;
}
header('Location: /auth/login', true, 302);
header('Location: /auth/keycloak', true, 302);
exit;

View File

@@ -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') {
</label>
</div>
<label class="login-field">
<span>Zusätzliche Info</span>
<textarea name="note" rows="5" placeholder="Optional: Bezug zur Familie, Einladung, gewünschte Nutzung, Rückfragekontakt"><?= htmlspecialchars($form['note'], ENT_QUOTES) ?></textarea>
</label>
<div class="login-form-grid">
<label class="login-field">
<span>Passwort</span>
@@ -155,14 +147,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
</label>
</div>
<div class="login-notice login-notice-info">
<strong>Wichtig</strong>
<p>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.</p>
</div>
<div class="login-actions">
<button class="login-button login-button-primary" type="submit">Registrierung absenden</button>
<a class="login-button login-button-secondary" href="/auth/login">Zurück zum Login</a>
<a class="login-button login-button-secondary" href="/auth/keycloak">Zurück zum Login</a>
</div>
</form>
</section>

View File

@@ -15,21 +15,13 @@ $keycloakConfig = ConfigLoader::load($projectRoot, 'keycloak');
$auth = new KeycloakAuth($keycloakConfig);
if (!$auth->shouldShowDesktop()) {
$previewUrl = null;
if ($auth->allowDesktopPreview()) {
$previewUrl = '/?' . urlencode($auth->previewQueryKey()) . '=1';
if ($auth->isConfigured()) {
header('Location: /auth/keycloak', true, 302);
exit;
}
$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';
http_response_code(503);
echo 'Keycloak ist nicht konfiguriert.';
exit;
}