;rgb:0000/0000/0000

更新
This commit is contained in:
gr
2026-09-28 14:53:47 +08:00
parent 71304f356d
commit 3cdc812f2b
5 changed files with 15 additions and 9 deletions
@@ -91,10 +91,11 @@ namespace {
Admin::$row['root'] = 0;
desktopCheck($result['data']['terminal'] === 7, 'desktop token reports the desktop terminal');
$mobile = $invoke(array_replace($valid, ['terminal' => 8]));
desktopCheck($mobile['code'] === 1, 'mobile console token (terminal 8) is accepted');
desktopCheck($mobile['data']['terminal'] === 8, 'mobile console token reports terminal 8');
$mobile = $invoke(array_replace($valid, ['terminal' => 9]));
desktopCheck($mobile['code'] === 1, 'mobile console token (terminal 9) is accepted');
desktopCheck($mobile['data']['terminal'] === 9, 'mobile console token reports terminal 9');
desktopCheck($mobile['data']['user_id'] === 'admin:9', 'mobile console maps to the same tenant identity');
desktopCheck($invoke(array_replace($valid, ['terminal' => 8]))['code'] === 0, 'AI browser console token rejected');
desktopCheck($invoke([])['code'] === 0, 'missing or expired cached identity rejected');
desktopCheck($invoke(array_replace($valid, ['terminal' => 1]))['code'] === 0, 'web token rejected');