22 lines
426 B
PHP
22 lines
426 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'));
|
|
|
|
if ($auth->isConfigured()) {
|
|
header('Location: /auth/keycloak', true, 302);
|
|
exit;
|
|
}
|
|
|
|
http_response_code(503);
|
|
echo 'Keycloak ist nicht konfiguriert.';
|