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