Update: 2026-05-03 22:15:40
This commit is contained in:
@@ -46,9 +46,10 @@ if (!$secret || strlen($secret) < 32) {
|
||||
json_error('Server configuration error', 500);
|
||||
}
|
||||
$payload = [
|
||||
'user_id' => $user['id'],
|
||||
'role' => $user['role'],
|
||||
'exp' => time() + (15 * 60) // 15 minutes
|
||||
'user_id' => $user['id'],
|
||||
'tenant_id' => $user['tenant_id'],
|
||||
'role' => $user['role'],
|
||||
'exp' => time() + (15 * 60) // 15 minutes
|
||||
];
|
||||
|
||||
$token = JWT::encode($payload, $secret);
|
||||
|
||||
Reference in New Issue
Block a user