Add tests for the legacy tokens

This commit is contained in:
ErickSkrauch
2019-09-23 00:53:13 +03:00
parent cf62c686b1
commit a148da2ecf
17 changed files with 222 additions and 52 deletions

View File

@@ -0,0 +1,4 @@
<?php
return [
'ZZQP8sS9urzriy8N9h6FwFNMOH3PkZ5T5PLqS6SX' => ['minecraft_server_session', 'obtain_own_account_info'],
];

View File

@@ -0,0 +1,16 @@
<?php
use Carbon\Carbon;
return [
'ZZQP8sS9urzriy8N9h6FwFNMOH3PkZ5T5PLqS6SX' => [
'id' => 'ZZQP8sS9urzriy8N9h6FwFNMOH3PkZ5T5PLqS6SX',
'session_id' => 1,
'expire_time' => Carbon::now()->addHour()->getTimestamp(),
],
'rc0sOF1SLdOxuD3bJcCQENmGTeYrGgy12qJScMx4' => [
'id' => 'rc0sOF1SLdOxuD3bJcCQENmGTeYrGgy12qJScMx4',
'session_id' => 1,
'expire_time' => Carbon::now()->subHour()->getTimestamp(),
],
];

View File

@@ -0,0 +1,8 @@
<?php
return [
'op7kPGAgHlsXRBJtkFg7wKOTpodvtHVW5NxR7Tjr' => [
'id' => 'op7kPGAgHlsXRBJtkFg7wKOTpodvtHVW5NxR7Tjr',
'access_token_id' => 'cynbpR53GK5HyvHuTtriHP7JpdqvFaYnWSS1twXX',
'session_id' => 1,
],
];

View File

@@ -0,0 +1,4 @@
<?php
return [
1 => ['minecraft_server_session', 'obtain_own_account_info'],
];

View File

@@ -3,24 +3,28 @@ return [
'admin-test1' => [
'account_id' => 1,
'client_id' => 'test1',
'legacy_id' => 1,
'scopes' => null,
'created_at' => 1479944472,
],
'banned-account-session' => [
'account_id' => 10,
'client_id' => 'test1',
'legacy_id' => 2,
'scopes' => null,
'created_at' => 1481421663,
],
'deleted-client-session' => [
'account_id' => 1,
'client_id' => 'deleted-oauth-client-with-sessions',
'legacy_id' => 3,
'scopes' => null,
'created_at' => 1519510065,
],
'actual-deleted-client-session' => [
'account_id' => 2,
'client_id' => 'deleted-oauth-client-with-sessions',
'legacy_id' => 4,
'scopes' => null,
'created_at' => 1519511568,
],