Viel neues

This commit is contained in:
Sven Steinert
2026-04-30 12:06:00 +02:00
parent 118809bfae
commit fce31ebcd7
1274 changed files with 181255 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
<?php
require_once 'vendor/autoload.php';
include 'config/config.php';
use Jumbojett\OpenIDConnectClient;
session_start();
// 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 authentifizieren
$oidc->authenticate();
// Benutzerinformationen abrufen
$_SESSION['user_authenticated'] = true;
$_SESSION['user_name'] = $oidc->requestUserInfo('name');
$_SESSION['user_email'] = $oidc->requestUserInfo('email');
$_SESSION['groups'] = $oidc->requestUserInfo('groups');
// Zurück zur Hauptseite
header('Location: index.php');
exit();
?>