Files
proxmox-selfservice/qa-tool/htdocs/login.php
Sven Steinert fce31ebcd7 Viel neues
2026-04-30 12:06:00 +02:00

32 lines
807 B
PHP

<?php
require_once 'vendor/autoload.php';
include 'config/config.php';
use Jumbojett\OpenIDConnectClient;
session_start();
if (getenv('AUTH_DISABLED') === 'true') {
$_SESSION['user_authenticated'] = true;
if (empty($_SESSION['user_name'])) { $_SESSION['user_name'] = 'localtest'; }
header('Location: index.php');
exit();
}
// OpenID Connect Client konfigurieren
$oidc = new OpenIDConnectClient(
$oidc_provider, // OpenID Provider URL
$oidc_client, // Client ID
$oidc_secret // Client Secret
);
// Weiterleitungen konfigurieren
$oidc->setRedirectURL($OIDC_REDIRECT_URL);
// Scopes als Array hinzufügen
$oidc->addScope(['openid', 'profile', 'email', 'groups']);
// Benutzer zur Authentifizierungsseite weiterleiten
$oidc->authenticate();
?>