Files
desktop/public/auth/keycloak/index.php
Lars Gebhardt-Kusche 823c5d197d
All checks were successful
Deploy / deploy-staging (push) Successful in 47s
Deploy / deploy-production (push) Has been skipped
update
2026-06-15 02:38:41 +02:00

24 lines
462 B
PHP

<?php
declare(strict_types=1);
require_once dirname(__DIR__, 3) . '/src/App/bootstrap.php';
use App\ConfigLoader;
use App\KeycloakAuth;
session_start();
$projectRoot = dirname(__DIR__, 3);
$auth = new KeycloakAuth(ConfigLoader::load($projectRoot, 'keycloak'));
$loginUrl = $auth->loginUrl();
if ($loginUrl === null) {
http_response_code(503);
echo 'Keycloak ist nicht konfiguriert.';
exit;
}
header('Location: ' . $loginUrl, true, 302);
exit;