mirror of
https://github.com/elyby/accounts.git
synced 2025-05-31 14:11:46 +05:30
Реализована логика oAuth авторизации приложений, добавлен Redis, удалены лишние тесты, пофикшены старые.
This commit is contained in:
15
tests/codeception/common/fixtures/OauthClientFixture.php
Normal file
15
tests/codeception/common/fixtures/OauthClientFixture.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
namespace tests\codeception\common\fixtures;
|
||||
|
||||
use common\models\OauthClient;
|
||||
use yii\test\ActiveFixture;
|
||||
|
||||
class OauthClientFixture extends ActiveFixture {
|
||||
|
||||
public $modelClass = OauthClient::class;
|
||||
|
||||
public $depends = [
|
||||
AccountFixture::class,
|
||||
];
|
||||
|
||||
}
|
11
tests/codeception/common/fixtures/OauthScopeFixture.php
Normal file
11
tests/codeception/common/fixtures/OauthScopeFixture.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
namespace tests\codeception\common\fixtures;
|
||||
|
||||
use common\models\OauthScope;
|
||||
use yii\test\ActiveFixture;
|
||||
|
||||
class OauthScopeFixture extends ActiveFixture {
|
||||
|
||||
public $modelClass = OauthScope::class;
|
||||
|
||||
}
|
17
tests/codeception/common/fixtures/OauthSessionFixture.php
Normal file
17
tests/codeception/common/fixtures/OauthSessionFixture.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
namespace tests\codeception\common\fixtures;
|
||||
|
||||
use common\models\OauthScope;
|
||||
use common\models\OauthSession;
|
||||
use yii\test\ActiveFixture;
|
||||
|
||||
class OauthSessionFixture extends ActiveFixture {
|
||||
|
||||
public $modelClass = OauthSession::class;
|
||||
|
||||
public $depends = [
|
||||
OauthClientFixture::class,
|
||||
AccountFixture::class,
|
||||
];
|
||||
|
||||
}
|
23
tests/codeception/common/fixtures/data/oauth-clients.php
Normal file
23
tests/codeception/common/fixtures/data/oauth-clients.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
return [
|
||||
'ely' => [
|
||||
'id' => 'ely',
|
||||
'secret' => 'ZuM1vGchJz-9_UZ5HC3H3Z9Hg5PzdbkM',
|
||||
'name' => 'Ely.by',
|
||||
'description' => 'Всем знакомое елуби',
|
||||
'redirect_uri' => 'http://ely.by',
|
||||
'account_id' => NULL,
|
||||
'is_trusted' => 0,
|
||||
'created_at' => 1455309271,
|
||||
],
|
||||
'tlauncher' => [
|
||||
'id' => 'tlauncher',
|
||||
'secret' => 'HsX-xXzdGiz3mcsqeEvrKHF47sqiaX94',
|
||||
'name' => 'TLauncher',
|
||||
'description' => 'Лучший альтернативный лаунчер для Minecraft с большим количеством версий и их модификаций, а также возмоностью входа как с лицензионным аккаунтом, так и без него.',
|
||||
'redirect_uri' => '',
|
||||
'account_id' => NULL,
|
||||
'is_trusted' => 0,
|
||||
'created_at' => 1455318468,
|
||||
],
|
||||
];
|
9
tests/codeception/common/fixtures/data/oauth-scopes.php
Normal file
9
tests/codeception/common/fixtures/data/oauth-scopes.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
return [
|
||||
'minecraft_server_session' => [
|
||||
'id' => 'minecraft_server_session',
|
||||
],
|
||||
'change_skin' => [
|
||||
'id' => 'change_skin',
|
||||
],
|
||||
];
|
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
return [
|
||||
];
|
Reference in New Issue
Block a user