This commit is contained in:
2026-03-04 22:22:16 +01:00
parent 1a481c4fdc
commit 13a45c0c55
3 changed files with 16 additions and 0 deletions

View File

@@ -24,3 +24,4 @@
define('APP_OIDC_ADMIN_GROUP', 'admin'); define('APP_OIDC_ADMIN_GROUP', 'admin');
define('APP_OIDC_USER_GROUP', 'family'); define('APP_OIDC_USER_GROUP', 'family');
define('APP_DEBUG_TOOL', false); define('APP_DEBUG_TOOL', false);
define('APP_AUTH_DEBUG', false);

View File

@@ -24,3 +24,4 @@
define('APP_OIDC_ADMIN_GROUP', 'admin'); define('APP_OIDC_ADMIN_GROUP', 'admin');
define('APP_OIDC_USER_GROUP', 'family'); define('APP_OIDC_USER_GROUP', 'family');
define('APP_DEBUG_TOOL', true); define('APP_DEBUG_TOOL', true);
define('APP_AUTH_DEBUG', true);

View File

@@ -55,4 +55,18 @@ $user = [
$_SESSION['auth_user'] = $user; $_SESSION['auth_user'] = $user;
if (defined('APP_AUTH_DEBUG') && APP_AUTH_DEBUG) {
$log = [
'ts' => date('c'),
'sub' => $user['sub'],
'email' => $user['email'],
'name' => $user['name'],
'groups' => $groups,
'iss' => $claims['iss'] ?? null,
'aud' => $claims['aud'] ?? null,
'claim_source' => !empty($groups) ? 'id_token_or_access_token' : 'none',
];
@file_put_contents(__DIR__ . '/../../debug/oidc_login.log', json_encode($log) . PHP_EOL, FILE_APPEND);
}
redirect('/'); redirect('/');