update
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user