OIDC test - test jumbojett oidc round two change root paths
This commit is contained in:
1 parent
4b7abac7ca
commit
07d3895eb5
6 files changed
+6
-6
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
session_start();
|
||||
$config = require __DIR__ . '/../config.php';
|
||||
|
||||
if (!isset($_SESSION['authenticated'])) {
|
||||
// User not logged in – show a login button
|
||||
echo '<h1>Welcome to the demo</h1>';
|
||||
echo '<p><a href="auth.php">Login with Authelia SSO</a></p>';
|
||||
exit;
|
||||
}
|
||||
|
||||
// The user is logged in – display the attributes
|
||||
$name = $_SESSION['name'] ?? 'unknown';
|
||||
$email = $_SESSION['email'] ?? 'unknown';
|
||||
$groups = $_SESSION['groups'] ?? [];
|
||||
|
||||
echo '<h1>Logged in as ' . htmlspecialchars($name) . '</h1>';
|
||||
echo '<ul>';
|
||||
echo '<li><strong>Email:</strong> ' . htmlspecialchars($email) . '</li>';
|
||||
echo '<li><strong>Groups:</strong> ' . htmlspecialchars(implode(', ', $groups)) . '</li>';
|
||||
echo '</ul>';
|
||||
|
||||
echo '<p><a href="logout.php">Logout</a></p>';
|
||||
Reference in new issue
Block a user