更新
This commit is contained in:
@@ -90,8 +90,15 @@ namespace {
|
||||
desktopCheck($invoke($valid)['data']['root'] === true, 'root comes from current account');
|
||||
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');
|
||||
desktopCheck($mobile['data']['user_id'] === 'admin:9', 'mobile console maps to the same tenant identity');
|
||||
|
||||
desktopCheck($invoke([])['code'] === 0, 'missing or expired cached identity rejected');
|
||||
desktopCheck($invoke(array_replace($valid, ['terminal' => 1]))['code'] === 0, 'web token rejected');
|
||||
desktopCheck($invoke(array_replace($valid, ['terminal' => 2]))['code'] === 0, 'admin mobile web token rejected');
|
||||
Admin::$row['disable'] = 1;
|
||||
desktopCheck($invoke($valid)['code'] === 0, 'disabled account rejected');
|
||||
Admin::$row = [];
|
||||
|
||||
Reference in New Issue
Block a user