OIDC test - move to www base
This commit is contained in:
1 parent
965d2d084a
commit
d572067cf6
9 files changed
+602
No files matched your search
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
require_once __DIR__ . '/config.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Fitness Site – OIDC Demo</title>
|
||||
<style>
|
||||
body { font-family: Arial, sans-serif; margin: 2rem; }
|
||||
.info { margin-top: 1rem; }
|
||||
pre { background: #f4f4f4; padding: 1rem; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>Fitness Site – OIDC Demo</h1>
|
||||
|
||||
<?php if (!isset($_SESSION['user'])): ?>
|
||||
<p>You are not logged in.</p>
|
||||
<p><a href="/login.php"><button>Login with Authelia</button></a></p>
|
||||
<?php else: ?>
|
||||
<p>Logged in as: <strong><?=htmlspecialchars($_SESSION['user']['user_info']['name'] ?? 'N/A')?></strong></p>
|
||||
|
||||
<div class="info">
|
||||
<h2>User Information</h2>
|
||||
<pre><?=htmlspecialchars(json_encode($_SESSION['user']['user_info'], JSON_PRETTY_PRINT))?></pre>
|
||||
</div>
|
||||
|
||||
<div class="info">
|
||||
<h2>ID Token Payload (claims)</h2>
|
||||
<pre><?=htmlspecialchars(json_encode($_SESSION['user']['id_info'], JSON_PRETTY_PRINT))?></pre>
|
||||
</div>
|
||||
|
||||
<p><a href="/logout.php"><button>Logout</button></a></p>
|
||||
<?php endif; ?>
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user