Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 683cba7118 | |||
| 1724d93094 | |||
| 1b34497627 | |||
| f77c2e0d6f | |||
| 6b9a0a1776 | |||
| 46859c4c36 | |||
| e0828952b5 | |||
| 4fe92774ed | |||
| a6ae9d9847 | |||
| 8264369785 | |||
| 2249b03ce9 | |||
| f441bfe15e | |||
| 34737afa5c | |||
| f158cdf74d | |||
| 7e0d2bd283 | |||
| 90eaf6145b | |||
| d1d9735818 | |||
| fa7d3376bd | |||
| 7d12c811fb | |||
| 4a1bc9ba4a | |||
| db701bee4e | |||
| 77eadf29ac | |||
| b7271e348a | |||
| c9a2f09b35 | |||
| 6a0d4cf96e |
+28
-34
@@ -4,55 +4,36 @@ APP_KEY=
|
|||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_URL=http://localhost
|
APP_URL=http://localhost
|
||||||
|
|
||||||
APP_LOCALE=en
|
|
||||||
APP_FALLBACK_LOCALE=en
|
|
||||||
APP_FAKER_LOCALE=en_US
|
|
||||||
|
|
||||||
APP_MAINTENANCE_DRIVER=file
|
|
||||||
# APP_MAINTENANCE_STORE=database
|
|
||||||
|
|
||||||
# PHP_CLI_SERVER_WORKERS=4
|
|
||||||
|
|
||||||
BCRYPT_ROUNDS=12
|
|
||||||
|
|
||||||
LOG_CHANNEL=stack
|
LOG_CHANNEL=stack
|
||||||
LOG_STACK=single
|
|
||||||
LOG_DEPRECATIONS_CHANNEL=null
|
LOG_DEPRECATIONS_CHANNEL=null
|
||||||
LOG_LEVEL=debug
|
LOG_LEVEL=debug
|
||||||
|
|
||||||
DB_CONNECTION=sqlite
|
DB_CONNECTION=mysql
|
||||||
# DB_HOST=127.0.0.1
|
DB_HOST=127.0.0.1
|
||||||
# DB_PORT=3306
|
DB_PORT=3306
|
||||||
# DB_DATABASE=laravel
|
DB_DATABASE=laravel
|
||||||
# DB_USERNAME=root
|
DB_USERNAME=root
|
||||||
# DB_PASSWORD=
|
DB_PASSWORD=
|
||||||
|
|
||||||
SESSION_DRIVER=database
|
BROADCAST_DRIVER=log
|
||||||
SESSION_LIFETIME=120
|
CACHE_DRIVER=file
|
||||||
SESSION_ENCRYPT=false
|
|
||||||
SESSION_PATH=/
|
|
||||||
SESSION_DOMAIN=null
|
|
||||||
|
|
||||||
BROADCAST_CONNECTION=log
|
|
||||||
FILESYSTEM_DISK=local
|
FILESYSTEM_DISK=local
|
||||||
QUEUE_CONNECTION=database
|
QUEUE_CONNECTION=sync
|
||||||
|
SESSION_DRIVER=file
|
||||||
CACHE_STORE=database
|
SESSION_LIFETIME=120
|
||||||
# CACHE_PREFIX=
|
|
||||||
|
|
||||||
MEMCACHED_HOST=127.0.0.1
|
MEMCACHED_HOST=127.0.0.1
|
||||||
|
|
||||||
REDIS_CLIENT=phpredis
|
|
||||||
REDIS_HOST=127.0.0.1
|
REDIS_HOST=127.0.0.1
|
||||||
REDIS_PASSWORD=null
|
REDIS_PASSWORD=null
|
||||||
REDIS_PORT=6379
|
REDIS_PORT=6379
|
||||||
|
|
||||||
MAIL_MAILER=log
|
MAIL_MAILER=smtp
|
||||||
MAIL_SCHEME=null
|
MAIL_HOST=mailpit
|
||||||
MAIL_HOST=127.0.0.1
|
MAIL_PORT=1025
|
||||||
MAIL_PORT=2525
|
|
||||||
MAIL_USERNAME=null
|
MAIL_USERNAME=null
|
||||||
MAIL_PASSWORD=null
|
MAIL_PASSWORD=null
|
||||||
|
MAIL_ENCRYPTION=null
|
||||||
MAIL_FROM_ADDRESS="hello@example.com"
|
MAIL_FROM_ADDRESS="hello@example.com"
|
||||||
MAIL_FROM_NAME="${APP_NAME}"
|
MAIL_FROM_NAME="${APP_NAME}"
|
||||||
|
|
||||||
@@ -62,4 +43,17 @@ AWS_DEFAULT_REGION=us-east-1
|
|||||||
AWS_BUCKET=
|
AWS_BUCKET=
|
||||||
AWS_USE_PATH_STYLE_ENDPOINT=false
|
AWS_USE_PATH_STYLE_ENDPOINT=false
|
||||||
|
|
||||||
|
PUSHER_APP_ID=
|
||||||
|
PUSHER_APP_KEY=
|
||||||
|
PUSHER_APP_SECRET=
|
||||||
|
PUSHER_HOST=
|
||||||
|
PUSHER_PORT=443
|
||||||
|
PUSHER_SCHEME=https
|
||||||
|
PUSHER_APP_CLUSTER=mt1
|
||||||
|
|
||||||
VITE_APP_NAME="${APP_NAME}"
|
VITE_APP_NAME="${APP_NAME}"
|
||||||
|
VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
|
||||||
|
VITE_PUSHER_HOST="${PUSHER_HOST}"
|
||||||
|
VITE_PUSHER_PORT="${PUSHER_PORT}"
|
||||||
|
VITE_PUSHER_SCHEME="${PUSHER_SCHEME}"
|
||||||
|
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
|
||||||
|
|||||||
+10
-15
@@ -1,24 +1,19 @@
|
|||||||
*.log
|
|
||||||
.DS_Store
|
|
||||||
.env
|
|
||||||
.env.backup
|
|
||||||
.env.production
|
|
||||||
.phpactor.json
|
|
||||||
.phpunit.result.cache
|
|
||||||
/.fleet
|
|
||||||
/.idea
|
|
||||||
/.nova
|
|
||||||
/.phpunit.cache
|
/.phpunit.cache
|
||||||
/.vscode
|
|
||||||
/.zed
|
|
||||||
/auth.json
|
|
||||||
/node_modules
|
/node_modules
|
||||||
/public/build
|
/public/build
|
||||||
/public/hot
|
/public/hot
|
||||||
/public/storage
|
/public/storage
|
||||||
/storage/*.key
|
/storage/*.key
|
||||||
/storage/pail
|
|
||||||
/vendor
|
/vendor
|
||||||
|
.env
|
||||||
|
.env.backup
|
||||||
|
.env.production
|
||||||
|
.phpunit.result.cache
|
||||||
Homestead.json
|
Homestead.json
|
||||||
Homestead.yaml
|
Homestead.yaml
|
||||||
Thumbs.db
|
auth.json
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
/.fleet
|
||||||
|
/.idea
|
||||||
|
/.vscode
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Facades;
|
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Facade;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Фасад для доступа к user сервису без инъекции зависимостей
|
|
||||||
*
|
|
||||||
* @see \App\Services\UserService
|
|
||||||
*/
|
|
||||||
class UserContext extends Facade
|
|
||||||
{
|
|
||||||
protected static function getFacadeAccessor()
|
|
||||||
{
|
|
||||||
return \App\Services\UserService::class;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use App\Services\AuthorizationService;
|
|
||||||
use App\Facades\UserContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Контроллер авторизации
|
|
||||||
*/
|
|
||||||
class AuthorizationController extends Controller
|
|
||||||
{
|
|
||||||
public function __construct(AuthorizationService $authorizationService)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public function getUserRole($moduleName)
|
|
||||||
{
|
|
||||||
$userPermissions = UserContext::getUserAppPermissions();
|
|
||||||
//Проверяем есть ли у пользователя в принципе доступ к приложению
|
|
||||||
if (array_key_exists($moduleName, $userPermissions) !== false) {
|
|
||||||
return response()->json(['userRole' => $userPermissions[$moduleName]], 403);
|
|
||||||
} else {
|
|
||||||
return response()->json(['message' => 'Приложение недоступно'], 403);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,246 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Controllers;
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use LdapRecord\Models\ActiveDirectory\User as LdapUserInfo;
|
|
||||||
use App\Models\User;
|
|
||||||
use App\Facades\UserContext;
|
|
||||||
use App\Services\AuthorizationService;
|
|
||||||
use App\Services\ApiResponder;
|
|
||||||
use App\Dto\ApiResponseDto;
|
|
||||||
|
|
||||||
class LoginController extends Controller
|
|
||||||
{
|
|
||||||
#Гаврилов
|
|
||||||
//КОГДА ПЕРЕЙДЕМ НА ГРУППЫ, ПОМЕНЯТЬ НА АДМИНСКУЮ ГРУППУ? ИЛИ ОСТАВИТЬ РАССЫЛКУ?
|
|
||||||
//ПЕРЕНЕСИ В .ENV И ВНИЗУ ПО КОДУ ГДЕ ОБРАЩАЕШЬСЯ К ЭТОМУ СВОЙСТВУ КЛАССА ПЕРЕПИШИ НА ПОЛУЧЕНИЕ СВОЙСТВА ИЗ ПЕРЕМЕННОЙ ОКРУЖЕНИЯ
|
|
||||||
/**
|
|
||||||
* @var string почтовая рассылка, куда входят админы
|
|
||||||
*/
|
|
||||||
private $adminGroup = '# Magic_admins';
|
|
||||||
/**
|
|
||||||
* @var array массив групп, которые не должны участвовать в авторизации пользователя и поэтому могут не храниться
|
|
||||||
*/
|
|
||||||
#Гаврилов
|
|
||||||
//ИСПОЛЬЗУЙ МАССИВ НИЖЕ, ЧТОБЫ УДАЛЯТЬ ГРУППЫ И НЕ ХРАНИТЬ ИХ В ПРОФИЛЕ ПОЛЬЗОВАТЕЛЯ. ИЛИ ЗАБИТЬ ХЕР И ХРАНИТЬ ВСЕ? ТОГДА УДАЛИ МАССИВ НИЖЕ
|
|
||||||
private $unnecessaryGroups = array(
|
|
||||||
'MCO.',
|
|
||||||
'ARSNOVA.',
|
|
||||||
'CHATBOT.',
|
|
||||||
'FOA_PROJECTS.',
|
|
||||||
'MAXOPTRA.',
|
|
||||||
'WEBSIGNER.',
|
|
||||||
'ECM.',
|
|
||||||
'BASIS.',
|
|
||||||
'MCO_DOCUMENT.',
|
|
||||||
'FACTOR.',
|
|
||||||
'BIP.',
|
|
||||||
'NKK.',
|
|
||||||
'CHATS.',
|
|
||||||
'IB_BSC.',
|
|
||||||
'DASHAAI.',
|
|
||||||
'VDI.',
|
|
||||||
'CTX',
|
|
||||||
'AP.AE.',
|
|
||||||
'Way4',
|
|
||||||
'sg.',
|
|
||||||
'AD.TEDDY',
|
|
||||||
'AP.APPV_',
|
|
||||||
'AP.BI_',
|
|
||||||
'AP.Citrix_',
|
|
||||||
'AP.CSD_',
|
|
||||||
'AP.EFK_',
|
|
||||||
'AP.FlexiCapture_',
|
|
||||||
'AP.HPSM.ACCESS.1',
|
|
||||||
'AP.HPSM.ACCESS.3',
|
|
||||||
'AP.HPSM.APPR_BR.Collection.',
|
|
||||||
'AP.HPSM.APPR_BR.CS.',
|
|
||||||
'AP.HPSM.ACCESS.CC',
|
|
||||||
'AP.HPSM.ACCESS.123',
|
|
||||||
'AP.HPSM.ACCESS.1.2',
|
|
||||||
'AP.HPSM.APPR',
|
|
||||||
'AP.OCP',
|
|
||||||
'AP.IBS_',
|
|
||||||
'AP.Intranet_',
|
|
||||||
'AP.Intranet.',
|
|
||||||
'AP.Jenkins_',
|
|
||||||
'AP.Kibana.',
|
|
||||||
'AP.LICA.',
|
|
||||||
'AP.MailSteam.',
|
|
||||||
'AP.MCO_',
|
|
||||||
'AP.MDW.',
|
|
||||||
'AP.POCHTA_',
|
|
||||||
'AP.PREPROD',
|
|
||||||
'AP.Prometheus',
|
|
||||||
'AP.RDS_',
|
|
||||||
'AP.SAS_',
|
|
||||||
'AP.Seguranzza_',
|
|
||||||
'AP.TEST.LICA.',
|
|
||||||
'AP.Test.MCO_',
|
|
||||||
'AP.TEST',
|
|
||||||
'App_',
|
|
||||||
'BTA_',
|
|
||||||
'Calculations ',
|
|
||||||
'Cards_',
|
|
||||||
'CC.',
|
|
||||||
'CCS_',
|
|
||||||
'Citrix',
|
|
||||||
'Collection_HR_',
|
|
||||||
'Collection_All',
|
|
||||||
'CS_',
|
|
||||||
'CSD_',
|
|
||||||
'DA_',
|
|
||||||
'DB.',
|
|
||||||
'DB_',
|
|
||||||
'Deny_',
|
|
||||||
'Diasoft ',
|
|
||||||
'Digital ',
|
|
||||||
'DOR_',
|
|
||||||
'ECM_',
|
|
||||||
'FS.',
|
|
||||||
'FW.',
|
|
||||||
'INFO_',
|
|
||||||
'MDC.',
|
|
||||||
'NRM_Collection',
|
|
||||||
'PFA.',
|
|
||||||
'RenTest_',
|
|
||||||
'ReportingGroup ',
|
|
||||||
'RS.',
|
|
||||||
'SG.',
|
|
||||||
'SP.',
|
|
||||||
'SRV',
|
|
||||||
'SRVFI09_',
|
|
||||||
'SSO_',
|
|
||||||
'test',
|
|
||||||
'TR_',
|
|
||||||
'WWW_',
|
|
||||||
'MailStream',
|
|
||||||
'SRVTST',
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
public function __construct(private AuthorizationService $authorizationService, private ApiResponder $apiResponder) {}
|
|
||||||
|
|
||||||
#Гаврилов
|
|
||||||
//ПЕРЕИМЕНУЙ КОНТРОЛЛЕР НА AUTHcoNTROLLER
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Метод завершения пользовательской сессии
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function logout()
|
|
||||||
{
|
|
||||||
//Удаляем все sanctum токены пользователя. Удаление всех токенов приведет к выходу пользователя со всех устройств, где он был залогинен в Magic
|
|
||||||
User::where('login', UserContext::getUserLogin())->first()->tokens()->delete();
|
|
||||||
session()->invalidate();
|
|
||||||
#Гаврилов
|
|
||||||
//ВЫЗОВ СКРИПТА НА СТАРОМ МЭДЖИКЕ ДЛЯ УДАЛЕНИЯ КУК АУТЕНТИФИКАЦИИ (ЛОГИН И ГРУППЫ)
|
|
||||||
return redirect('/login');
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#Гаврилов
|
|
||||||
//РАЗНЕСИ ЛОГИКУ МЕЖДУ МЕТОДАМИ, А ТО ПОКА ВСЯ ЛОГИКА В ОДНОМ МЕТОД LDAPCHECK
|
|
||||||
public function ldapCheckUser(Request $request)
|
|
||||||
{
|
|
||||||
if ($request->_auth_login) {
|
|
||||||
if (Auth::attempt([
|
|
||||||
'samaccountname' => $request->_auth_login,
|
|
||||||
'password' => $request->_auth_password,
|
|
||||||
])) {
|
|
||||||
|
|
||||||
$userGroups = $this->getUserGroups($request->_auth_login);
|
|
||||||
session()->put('_auth_login', $request->_auth_login);
|
|
||||||
session()->put('_auth_groups', $userGroups);
|
|
||||||
//Если пользователь зашел впервые - записываем его логин в таблицу users. Она нужна для корректного взаимодействия с пакетом Sanctum
|
|
||||||
$user = User::firstOrCreate(
|
|
||||||
['login' => $request->_auth_login],
|
|
||||||
);
|
|
||||||
//Удаляем все предыдущие sanctum токены пользователя
|
|
||||||
User::where('login', $request->_auth_login)->first()->tokens()->delete();
|
|
||||||
//Определяем на какую страницу нужно бросить пользователя после успешной аутентификации. По умолчанию кидаем в меню
|
|
||||||
$redirectUrl = session()->has('_auth_prev_page') ? session()->get('_auth_prev_page') : ('/menu');
|
|
||||||
$isAdminFlag = in_array($this->adminGroup, $userGroups);
|
|
||||||
//Кладем в сессию информацию о том является ли пользователь админом
|
|
||||||
session()->put('is_admin', $isAdminFlag);
|
|
||||||
//Устанавливаем в пользовательский сервис параметры пользователя
|
|
||||||
UserContext::setUserLogin($request->_auth_login);
|
|
||||||
UserContext::setUserADGroups($userGroups);
|
|
||||||
UserContext::setUserEmails($userGroups);
|
|
||||||
UserContext::setIsAdminFlag($isAdminFlag);
|
|
||||||
$userPermissions = $this->authorizationService->getUserAppPermissions();
|
|
||||||
UserContext::setUserAppPermissions($userPermissions);
|
|
||||||
//Генерим Sanctum токен, чтобы поместить его в куки при редиректе
|
|
||||||
$token = $user->createToken('sanctum-token', [
|
|
||||||
'permissions' => $userPermissions
|
|
||||||
//Устанавливаем время жизни sanctum токена синхронно с временем жизни сессии из конфига
|
|
||||||
], now()->addHours(config('app.session_life_time') / 60))->plainTextToken;
|
|
||||||
return redirect($redirectUrl)
|
|
||||||
->withCookie('sanctum_token', $token, 60 * 24, '/', null, true, true);
|
|
||||||
} else {
|
|
||||||
#Гаврилов
|
|
||||||
//СООБЩЕНИЕ ОБ ОШИБКЕ ПРИ НЕУДАЧНОЙ АУТЕНТИФИКАЦИИ
|
|
||||||
return redirect('/login');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Метод фонового обновления санктум токена при получении 401 ошибки в ответе api ендпоинта
|
|
||||||
*
|
|
||||||
* @param Request $request
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function silentRefreshUserSanctumToken(Request $request)
|
|
||||||
{
|
|
||||||
//Если сессия истекла - возвращаем 401 ошибку и редирект на /login в axios
|
|
||||||
if (!Auth::check()) {
|
|
||||||
$this->apiResponder->setDto(new ApiResponseDto(null, ['token_refresh' => false]));
|
|
||||||
return response()->json($this->apiResponder->error(), 401);
|
|
||||||
}
|
|
||||||
$token = $request->cookie('sanctum_token');
|
|
||||||
$accessToken = \Laravel\Sanctum\PersonalAccessToken::findToken($token);
|
|
||||||
//Если токен "протух" - продлеваем его на час
|
|
||||||
if (now()->diffInMinutes($accessToken->expires_at, false) < 1) {
|
|
||||||
$accessToken->update(
|
|
||||||
[
|
|
||||||
'expires_at' => now()->addHours(1)
|
|
||||||
]
|
|
||||||
);
|
|
||||||
$this->apiResponder->setDto(new ApiResponseDto(null, ['token_refresh' => true]));
|
|
||||||
return response()->json($this->apiResponder->success());
|
|
||||||
} else {
|
|
||||||
//Если токен еще "свежий" - значит причина 401 ошибки в чем-то другом. Не обновляем токен, просто возвращаем 401 ошибку и редирект на /login в axios
|
|
||||||
$this->apiResponder->setDto(new ApiResponseDto(null, ['token_refresh' => false]));
|
|
||||||
return response()->json($this->apiResponder->error(), 401);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Метод получает группы пользователя из ldap
|
|
||||||
*
|
|
||||||
* @param string $userLogin логин пользователя, чьи группы получаем
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getUserGroups($userLogin)
|
|
||||||
{
|
|
||||||
$userGroups = [];
|
|
||||||
$ldapUser = LdapUserInfo::findBy('samaccountname', $userLogin);
|
|
||||||
$ldapUser->memberOf;
|
|
||||||
if (isset($ldapUser->memberOf)) {
|
|
||||||
foreach ($ldapUser->memberOf as $ldapGroupInfo) {
|
|
||||||
$CN_group = substr($ldapGroupInfo, 0, stripos($ldapGroupInfo, ","));
|
|
||||||
$groupName = str_replace(array('CN=', '\\'), array('', ''), $CN_group);
|
|
||||||
$clearGroupName = trim($groupName);
|
|
||||||
if ($clearGroupName && $clearGroupName == str_replace($this->unnecessaryGroups, '', $clearGroupName)) {
|
|
||||||
$userGroups[] = $clearGroupName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $userGroups;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http;
|
||||||
|
|
||||||
|
use App\Http\Middleware\CheckUserAppAccess;
|
||||||
|
use Illuminate\Foundation\Http\Kernel as HttpKernel;
|
||||||
|
|
||||||
|
class Kernel extends HttpKernel
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The application's global HTTP middleware stack.
|
||||||
|
*
|
||||||
|
* These middleware are run during every request to your application.
|
||||||
|
*
|
||||||
|
* @var array<int, class-string|string>
|
||||||
|
*/
|
||||||
|
protected $middleware = [
|
||||||
|
// \App\Http\Middleware\TrustHosts::class,
|
||||||
|
\App\Http\Middleware\TrustProxies::class,
|
||||||
|
\Illuminate\Http\Middleware\HandleCors::class,
|
||||||
|
\App\Http\Middleware\PreventRequestsDuringMaintenance::class,
|
||||||
|
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class,
|
||||||
|
\App\Http\Middleware\TrimStrings::class,
|
||||||
|
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class,
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The application's route middleware groups.
|
||||||
|
*
|
||||||
|
* @var array<string, array<int, class-string|string>>
|
||||||
|
*/
|
||||||
|
protected $middlewareGroups = [
|
||||||
|
'web' => [
|
||||||
|
\App\Http\Middleware\EncryptCookies::class,
|
||||||
|
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
|
||||||
|
\Illuminate\Session\Middleware\StartSession::class,
|
||||||
|
\App\Http\Middleware\AuthenticateMagic::class,
|
||||||
|
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
|
||||||
|
\App\Http\Middleware\VerifyCsrfToken::class,
|
||||||
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
],
|
||||||
|
|
||||||
|
'api' => [
|
||||||
|
\App\Http\Middleware\EncryptCookies::class,
|
||||||
|
//\Illuminate\Session\Middleware\StartSession::class,
|
||||||
|
//\Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||||
|
'throttle:api',
|
||||||
|
//\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
//\Illuminate\Session\Middleware\AuthenticateSession::class, // Опционально
|
||||||
|
//\Illuminate\Auth\Middleware\Authenticate::class.':sanctum', // Глобальная аутентификация
|
||||||
|
//Кастомный посредник аутентификации, который наследует стандартному посреднику аутентификации с передачей guarda sanctum. Сначала в кастомном посреднике будет проведена аутентификация sanctum, если будет выброшена ошибка, она будет обработана кастомным посредником (с возвратом сообщения об ошибке и корректного статуса). Без этой реализации стандартный посредник аутентификации пытался редиректить на роут login, которого не должно быть при обращении к api ендпоинту
|
||||||
|
\App\Http\Middleware\AuthenticateMagicApi::class.':sanctum',
|
||||||
|
\Illuminate\Routing\Middleware\ThrottleRequests::class.':api',
|
||||||
|
\Illuminate\Routing\Middleware\SubstituteBindings::class,
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The application's middleware aliases.
|
||||||
|
*
|
||||||
|
* Aliases may be used instead of class names to conveniently assign middleware to routes and groups.
|
||||||
|
*
|
||||||
|
* @var array<string, class-string|string>
|
||||||
|
*/
|
||||||
|
protected $middlewareAliases = [
|
||||||
|
'auth' => \App\Http\Middleware\Authenticate::class,
|
||||||
|
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
|
||||||
|
'auth.session' => \Illuminate\Session\Middleware\AuthenticateSession::class,
|
||||||
|
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
|
||||||
|
'can' => \Illuminate\Auth\Middleware\Authorize::class,
|
||||||
|
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
|
||||||
|
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
|
||||||
|
'precognitive' => \Illuminate\Foundation\Http\Middleware\HandlePrecognitiveRequests::class,
|
||||||
|
'signed' => \App\Http\Middleware\ValidateSignature::class,
|
||||||
|
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
|
||||||
|
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
|
||||||
|
//Посредник проверки доступных ролей в приложении
|
||||||
|
'checkPermission' => \App\Http\Middleware\CheckUserPermission::class,
|
||||||
|
//Посредник проверки доступа к приложению
|
||||||
|
'checkAppAccess' => \App\Http\Middleware\CheckUserAppAccess::class,
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Auth\Middleware\Authenticate as Middleware;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
|
|
||||||
class Authenticate extends Middleware
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the path the user should be redirected to when they are not authenticated.
|
|
||||||
*/
|
|
||||||
protected function redirectTo(Request $request): ?string
|
|
||||||
{
|
|
||||||
return $request->expectsJson() ? null : route('login');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,73 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Closure;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Illuminate\Support\Facades\Auth;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use App\Facades\UserContext;
|
|
||||||
use App\Models\User;
|
|
||||||
use Laravel\Sanctum\PersonalAccessToken;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Глобальный посредник аутентификации на платформе Magic для всех роутов платформы
|
|
||||||
*/
|
|
||||||
class AuthenticateMagic
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Handle an incoming request.
|
|
||||||
*
|
|
||||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
|
||||||
*/
|
|
||||||
public function handle(Request $request, Closure $next): Response
|
|
||||||
{
|
|
||||||
|
|
||||||
//TODO ПРОВЕРИТЬ
|
|
||||||
//Если сессия не стартовала возможно пользователь сразу обращается к api ендпоинту (ПРОВЕРИТЬ)
|
|
||||||
if (session()->isStarted()) {
|
|
||||||
if (session()->has('_auth_login')) {
|
|
||||||
//гаврилов. получение токена
|
|
||||||
// $token = $request->user();
|
|
||||||
// $userId = User::where('login', $token->getAttributes()['samaccountname'][0])->get()->toArray()[0]['id'];
|
|
||||||
// $tokenExpires = PersonalAccessToken::where('tokenable_id', $userId)->get()->toArray()[0]['expires_at'];
|
|
||||||
// echo '<pre>'; var_dump(new \DateTime($tokenExpires)); echo'</pre>';
|
|
||||||
// echo '<pre>'; var_dump(PersonalAccessToken::where('tokenable_id', $userId)->get()->toArray()[0]['expires_at']); echo'</pre>';
|
|
||||||
//Если токен истекает менее через 60 минут, продлеваем его на 2 часа. Ситуации, что сессия протухла, а токен продолжает жить не может случиться, так как апи запросы с фронта отправляют куку аутентификации, которая проверяется при $this->authenticate. Если она протухла, возвратится 401 ошибку.
|
|
||||||
// if ($token->expires_at->diffInMinutes(now()) < 60) {
|
|
||||||
// $token->update(
|
|
||||||
// [
|
|
||||||
// 'expires_at' => now()->addHours(2)
|
|
||||||
// ]
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
|
|
||||||
//Через фасад устанавливаем все значения аутентифицированного пользователя, чтобы через этот же фасад можно было и любого места в приложении их получить.
|
|
||||||
UserContext::setUserLogin(session()->get('_auth_login'));
|
|
||||||
$userGroups = session()->get('_auth_groups');
|
|
||||||
UserContext::setUserADGroups($userGroups);
|
|
||||||
UserContext::setUserEmails($userGroups);
|
|
||||||
UserContext::setIsAdminFlag(session()->get('is_admin'));
|
|
||||||
//На этапе посредника мы не проводим повторное определение ролей пользователя, это было сделано в LoginController в процессе авторизации после успешной аутентификации. Здесь мы уже берем его доступы из таблицы с токенами
|
|
||||||
$user = User::where('login', UserContext::getUserLogin())->first();
|
|
||||||
UserContext::setUserId($user->id);
|
|
||||||
UserContext::setUserAppPermissions($user->tokens()->latest()->first()->abilities['permissions']);
|
|
||||||
#Гаврилов
|
|
||||||
return $next($request);
|
|
||||||
} else {
|
|
||||||
//Получаем адрес предыдущей страницы, на которую хотел попасть пользователь, чтобы направить его после успешной аутентификации на этот адрес
|
|
||||||
$prevPageUrl = explode('/', $_SERVER['REDIRECT_URL']);
|
|
||||||
//Удаляем из URL редиректа пустые сегменты и сегмент с названием приложения (оно подставляется при редиректе само)
|
|
||||||
unset($prevPageUrl[0], $prevPageUrl[1]);
|
|
||||||
//Кладем в сессию адрес страницы. только если это не страница выхода, иначе после аутентификации пользователя сразу выбросит
|
|
||||||
session()->put('_auth_prev_page', implode('/', $prevPageUrl) == 'logout' ? '/menu' : implode('/', $prevPageUrl));
|
|
||||||
return redirect('/login');
|
|
||||||
//редирект на страницу login с сообщением об ошибке
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return redirect('/login');
|
|
||||||
//redirect на страницу login после которой точно сессия застартует, так как это webроут, а не api
|
|
||||||
}
|
|
||||||
// return $next($request);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,61 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Кастомный посредник для обработки неудачной аутентификации Sanctum при обращении к api ендпоинтам. Стандартный посредник аутентификации пытается редиректить на роут login, чего быть не должно при работе с api
|
|
||||||
* @author dgavrilov
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace app\Http\Middleware;
|
|
||||||
|
|
||||||
use Closure;
|
|
||||||
use Illuminate\Auth\Middleware\Authenticate as BaseAuthenticate;
|
|
||||||
use Illuminate\Auth\AuthenticationException;
|
|
||||||
use App\Facades\UserContext;
|
|
||||||
|
|
||||||
class AuthenticateMagicApi extends BaseAuthenticate
|
|
||||||
{
|
|
||||||
public function handle($request, Closure $next, ...$guards)
|
|
||||||
{
|
|
||||||
// if ($request->is('api/silent_token_refresh')) {
|
|
||||||
// return $next($request);
|
|
||||||
// }
|
|
||||||
//Если пользователь в рамках сессии обращается к api ендпоинтам из приложения, он не всегда может установить заголовок с sanctum токеном (например, переходя по ссылкке <a href='.../api/delItem/id'>). В этом случае, проверяем куки и устанавливаем заголовок оттуда, так как при аутентификации пользовательский логин кладется в куки. Это позволяет нам не устанвливать заголовк в каждом fetch запросе на фронте
|
|
||||||
if ($request->is('api/*') && ($token = $request->cookie('sanctum_token'))) {
|
|
||||||
$request->headers->set("Authorization", "Bearer $token");
|
|
||||||
}
|
|
||||||
//Переопределяем поведение в случае возникновения ошибки при стандартной аутентификации. Стандартное поведение перебрасывает на страницу login, мы же возвращаем 401 ошибку, так как понимаем, что пользователь обратился по api
|
|
||||||
//DGAVRILOV. ПОВЕДЕНИЕ, ОПИСАННОЕ ВЫШЕ, ПРИВОДИТ К ОШИБКЕ. ЕСЛИ ПОЛЬЗОВАТЕЛЬ ОТПРАВИЛ API ЗАПРОС С ФРОНТА И ЕГО СЕССИЯ ПРОТУХЛА, ВОЗВРАЩАЕТСЯ 401 ОШИБКА ВО ВКЛАДКЕ NETWORK, НО ПОЛЬЗОВАТЕЛЯ НЕ ПЕРЕБРАСЫВАЕТ НА СТРАНИЦУ /LOGIN. ЕСЛИ ПОПРАВИТЬ ПОСРЕДНИК WEB АУТЕНТИФИКАЦИИ, ТО ЭТОЙ ПРОБЛЕМЫ НЕ БУДЕТ? БУДЕТ ПЕРЕБРАСЫВАТЬ НА СТРАНИЦУ LOGIN СО СТРАНИЦЫ, ОТКУДА СОВЕРЩАЛСЯ ВЫЗО API ЕНДПОИНТА? СКОРЕЕ ВСЕГО НЕТ, НУЖНО БУДЕТ ПРИ ВЫЗОВЕ API КАК-ТО ПЕРЕХВАТЫВАТЬ 401 ОШИБКУ И ОТПРАВЛЯТЬ НА СТРАНИЦУ /LOGIN
|
|
||||||
try {
|
|
||||||
//Стандартная аутентификация по санктум токену (проверяется срок жизни)
|
|
||||||
$this->authenticate($request, $guards);
|
|
||||||
//$token = $request->user()->currentAccessToken();
|
|
||||||
//Если токен истекает менее через 60 минут, продлеваем его на 2 часа. Ситуации, что сессия протухла, а токен продолжает жить не может случиться, так как апи запросы с фронта отправляют куку аутентификации, которая проверяется при $this->authenticate. Если она протухла, возвратится 401 ошибку.
|
|
||||||
// if ($token->expires_at->diffInMinutes(now()) < 60) {
|
|
||||||
// $token->update(
|
|
||||||
// [
|
|
||||||
// 'expires_at' => now()->addHours(2)
|
|
||||||
// ]
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
//После успешной аутентификации Sanctum обогащаем UserService параметрами пользователя (логин, роли приложения)
|
|
||||||
#Гаврилов
|
|
||||||
//ПОКА НЕ ДОБАВЛЯЮ ГРУППЫ AD B EMAILS, ТАК КАК В WEB КОНТУРЕ ОНИ ОПРЕДЕЛЯЮТСЯ ПРИ AD АУТЕНТИФИКАЦИИ И ПОЛУЧЕННЫЕ ЗНАЧЕНИЯ СКЛАДЫВАЮТСЯ В SESSION. В API КОНТУРЕ ДОСТУПА К СЕССИИ НЕТ - ПРОВОДИТЬ AD АУТЕНТИФИКАЦИЮ НЕ ПОЛУЧИТС БЕЗ ПАРОЛЯ ПОЛЬЗОВАТЕЛЯ, КОТОРЫЙ НИГДЕ НЕ ХРАНИТСЯ. ПОЭТОМУ, ЕСЛИ ПОНАДОБИТСЯ ДОСТАВАТЬ В API КОНТУРЕ ГРУППЫ ПОЛЬЗОВАТЕЛЯ, ПРИ AD АУТЕНТИФИКАЦИИ ПОНАДОБИТСЯ КЛАСТЬ AD ГРУППЫ ПОЛЬЗОВАТЕЛЯ И ЕГО EMAILS В ПОЛЕ ABILITIES ТАБЛИЦЫ PERSONAL ACCESS TOKENS ПО АНАЛОГИИ С PERISSIONS
|
|
||||||
#Гаврилов
|
|
||||||
//НУЖНО ЛИ ОБОГАЩАТЬ USERcoNTEXT НИЖЕ, ЕСЛИ ПРИ WEB АУТЕНТИФИКАЦИИ КОНТЕКСТ УЖЕ ДОЛЖЕН БЫЛ БЫТЬ ОБОГАЩЕН. вЕРОЯТНО, ЭТО НУЖНО ДЛЯ ОБРАБОТКИ ЧИСТО API ЗАПРОСОВ (БЕЗ ВХОДА В СИСТЕМУ), НО НАДО ПРОВЕРИТЬ
|
|
||||||
UserContext::setUserLogin($request->user()->login);
|
|
||||||
UserContext::setUserAppPermissions($request->user()->currentAccessToken()->abilities['permissions']);
|
|
||||||
} catch (AuthenticationException $auth) {
|
|
||||||
if ($request->is('api/*')) {
|
|
||||||
return response()->json([
|
|
||||||
#Гаврилов
|
|
||||||
//СКОРРЕКТИРУЙ ИНФОРМАЦИЮ О ВОЗВРАЩАЕМОЙ ОШИБКЕ?
|
|
||||||
'error' => 'Unauthenticated',
|
|
||||||
'message' => 'Invalid or missing authentication token'
|
|
||||||
], 401);
|
|
||||||
}
|
|
||||||
|
|
||||||
throw $auth;
|
|
||||||
}
|
|
||||||
return $next($request);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Closure;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use App\Facades\UserContext;
|
|
||||||
|
|
||||||
//ЭТОТ ПОСРЕДНИК ПРИМЕНЯЕТСЯ В WEB РОУТАХ И В API ЕНДПОИНТАХ ПОКА ТОЛЬКО ПРИЛОЖЕНИЯ ТАКСИ, НО ПО ЛОГИКЕ, ЕГО НУЖНО ИСПОЛЬЗОВАТЬ ВО ВСЕХ БУДУЩИХ МОДУЛЯХ. С ЕГО ПОМОЩЬЮ ПРОВЕРЯЕТСЯ КАЖДЫЙ ЗАПРОС К МОДУЛЮ - ВООБЩЕ ЕСТЬ ДОСТУП У ПОЛЬЗОВАТЕЛЯ ИЛИ НЕТ
|
|
||||||
//В KERNEL У ЭТОГО ПОСРЕДНИКА ПРОПИСАН АЛИАС, КОТОРЫЙ УКАЗЫВАЕТСЯ УЖЕ В MODULE/ROUTES/WEB.PHP И API.PHP
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Посредник проверки доступа пользователя к приложению
|
|
||||||
*/
|
|
||||||
class CheckUserAppAccess
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Handle an incoming request.
|
|
||||||
*
|
|
||||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
|
||||||
*/
|
|
||||||
public function handle(Request $request, Closure $next): Response
|
|
||||||
{
|
|
||||||
$moduleName = explode('/', $request->route()->getPrefix());
|
|
||||||
$moduleName = end($moduleName) ?? null;
|
|
||||||
if ($moduleName) {
|
|
||||||
if (array_key_exists($moduleName, UserContext::getUserAppPermissions()) !== false) {
|
|
||||||
return $next($request);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//Если ошибка при обращении к api ендпоинту
|
|
||||||
if ($request->expectsJson()) {
|
|
||||||
return response()->json(['message' => "Ошибка! Приложение недоступно"], 403);
|
|
||||||
//Если ошибка при обращении к web роуту
|
|
||||||
} else {
|
|
||||||
#Гаврилов
|
|
||||||
//ЕСЛИ ВЫЗЫВАЕТСЯ WEB РОУТ НЕ С ФРОНТА, ТО ПРОИСХОДИТ РЕДИРЕКТ БЕЗ УКАЗАНИЯ ТЕКСТА ОШИБКИ. нАПРИМЕР, ПРИ РЕДИРЕКТЕ НИЖЕ НА СТРАНИЦУ МЕНЮ, ПОЛЬЗОВАТЕЛЬ НЕ УВИДИТ НИКАКОГО ОПОВЕЩЕНИЯ ОБ ОШИБКЕ
|
|
||||||
//ЭТУ ПРОБЛЕМУ Я ИСПРАВЛЯЛ, ЧЕРЕЗ ГЕНЕРАЦИЮ НОТИФИКАЦИЙ НА БЭКЕ И ДОБАВЛЕНИЯ ИХ В ОПРЕДЕЛЕННУЮ ОЧЕРЕДЬ REDIS, КОТОРУЮ ЧИТАЕТ КАЖДАЯ СТРАНИЦА ПРИ ПЕРВИЧНОМ РЕНДЕРИНГЕ. НАДО ПОСМОТРЕТЬ ГДЕ Я УЖЕ ТАКОЕ РЕАЛИЗОВЫВАЛ
|
|
||||||
return redirect('/menu');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Closure;
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
|
||||||
use App\Models\User;
|
|
||||||
use App\Facades\UserContext;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Посредник проверки доступа пользовательской роли к роуту или ендпоинту
|
|
||||||
*/
|
|
||||||
class CheckUserPermission
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Handle an incoming request.
|
|
||||||
*
|
|
||||||
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
|
||||||
*/
|
|
||||||
public function handle(Request $request, Closure $next, string $requirement): Response
|
|
||||||
{
|
|
||||||
//Роли, которым доступен функционал
|
|
||||||
$accessRoles = explode(';', $requirement);
|
|
||||||
$userPermissions = UserContext::getUserAppPermissions();
|
|
||||||
//Всем роутам модуля добавляем префикс, поэтому можем ориентироваться на него, чтобы получить имя модуля, откуда пришел запрос
|
|
||||||
$moduleName = explode('/', $request->route()->getPrefix());
|
|
||||||
$moduleName = end($moduleName) ?? null;
|
|
||||||
|
|
||||||
if ($moduleName) {
|
|
||||||
if (array_key_exists($moduleName, UserContext::getUserAppPermissions()) !== false) {
|
|
||||||
if (in_array($userPermissions[$moduleName], $accessRoles)) {
|
|
||||||
return $next($request);
|
|
||||||
}
|
|
||||||
// else {
|
|
||||||
// return redirect('/menu');
|
|
||||||
// #Гаврилов
|
|
||||||
// //РЕДИРЕКТ НА СТРАНИЦУ 403
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
// else {
|
|
||||||
// return redirect('/menu');
|
|
||||||
// #Гаврилов
|
|
||||||
// //РЕДИРЕКТ НА СТРАНИЦУ 403
|
|
||||||
// //redirect();
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
// else {
|
|
||||||
// return redirect('/menu');
|
|
||||||
// #Гаврилов
|
|
||||||
// //КУДА РЕДИРЕКТИТЬ или что возвращать, если имя модуля не определено?
|
|
||||||
// }
|
|
||||||
|
|
||||||
//Если ошибка при обращении к api ендпоинту
|
|
||||||
if ($request->expectsJson()) {
|
|
||||||
return response()->json(['message' => "Ошибка! Функционал недоступен для вашей роли"], 403);
|
|
||||||
//Если ошибка при обращении к web роуту
|
|
||||||
} else {
|
|
||||||
#Гаврилов
|
|
||||||
//ЕСЛИ ВЫЗЫВАЕТСЯ WEB РОУТ НЕ С ФРОНТА, ТО ПРОИСХОДИТ РЕДИРЕКТ БЕЗ УКАЗАНИЯ ТЕКСТА ОШИБКИ. нАПРИМЕР, ПРИ РЕДИРЕКТЕ НИЖЕ НА СТРАНИЦУ МЕНЮ, ПОЛЬЗОВАТЕЛЬ НЕ УВИДИТ НИКАКОГО ОПОВЕЩЕНИЯ ОБ ОШИБКЕ.
|
|
||||||
//ЭТУ ПРОБЛЕМУ Я ИСПРАВЛЯЛ, ЧЕРЕЗ ГЕНЕРАЦИЮ НОТИФИКАЦИЙ НА БЭКЕ И ДОБАВЛЕНИЯ ИХ В ОПРЕДЕЛЕННУЮ ОЧЕРЕДЬ REDIS, КОТОРУЮ ЧИТАЕТ КАЖДАЯ СТРАНИЦА ПРИ ПЕРВИЧНОМ РЕНДЕРИНГЕ. НАДО ПОСМОТРЕТЬ ГДЕ Я УЖЕ ТАКОЕ РЕАЛИЗОВЫВАЛ
|
|
||||||
return redirect('/menu');
|
|
||||||
}
|
|
||||||
#Гаврилов
|
|
||||||
//РЕДИРЕКТ НА СТРАНИЦУ 403
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;
|
||||||
|
|
||||||
|
class EncryptCookies extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The names of the cookies that should not be encrypted.
|
||||||
|
*
|
||||||
|
* @var array<int, string>
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Middleware\PreventRequestsDuringMaintenance as Middleware;
|
||||||
|
|
||||||
|
class PreventRequestsDuringMaintenance extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The URIs that should be reachable while maintenance mode is enabled.
|
||||||
|
*
|
||||||
|
* @var array<int, string>
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
//
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,30 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use App\Providers\RouteServiceProvider;
|
||||||
|
use Closure;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
use Illuminate\Support\Facades\Auth;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
|
||||||
|
class RedirectIfAuthenticated
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Handle an incoming request.
|
||||||
|
*
|
||||||
|
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
|
||||||
|
*/
|
||||||
|
public function handle(Request $request, Closure $next, string ...$guards): Response
|
||||||
|
{
|
||||||
|
$guards = empty($guards) ? [null] : $guards;
|
||||||
|
|
||||||
|
foreach ($guards as $guard) {
|
||||||
|
if (Auth::guard($guard)->check()) {
|
||||||
|
return redirect(RouteServiceProvider::HOME);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $next($request);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;
|
||||||
|
|
||||||
|
class TrimStrings extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The names of the attributes that should not be trimmed.
|
||||||
|
*
|
||||||
|
* @var array<int, string>
|
||||||
|
*/
|
||||||
|
protected $except = [
|
||||||
|
'current_password',
|
||||||
|
'password',
|
||||||
|
'password_confirmation',
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Http\Middleware\TrustHosts as Middleware;
|
||||||
|
|
||||||
|
class TrustHosts extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Get the host patterns that should be trusted.
|
||||||
|
*
|
||||||
|
* @return array<int, string|null>
|
||||||
|
*/
|
||||||
|
public function hosts(): array
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
$this->allSubdomainsOfApplicationUrl(),
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Http\Middleware;
|
||||||
|
|
||||||
|
use Illuminate\Http\Middleware\TrustProxies as Middleware;
|
||||||
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
class TrustProxies extends Middleware
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* The trusted proxies for this application.
|
||||||
|
*
|
||||||
|
* @var array<int, string>|string|null
|
||||||
|
*/
|
||||||
|
protected $proxies;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The headers that should be used to detect proxies.
|
||||||
|
*
|
||||||
|
* @var int
|
||||||
|
*/
|
||||||
|
protected $headers =
|
||||||
|
Request::HEADER_X_FORWARDED_FOR |
|
||||||
|
Request::HEADER_X_FORWARDED_HOST |
|
||||||
|
Request::HEADER_X_FORWARDED_PORT |
|
||||||
|
Request::HEADER_X_FORWARDED_PROTO |
|
||||||
|
Request::HEADER_X_FORWARDED_AWS_ELB;
|
||||||
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Http\Middleware;
|
|
||||||
|
|
||||||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware;
|
|
||||||
|
|
||||||
class VerifyCsrfToken extends Middleware
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* The URIs that should be excluded from CSRF verification.
|
|
||||||
*
|
|
||||||
* @var array<int, string>
|
|
||||||
*/
|
|
||||||
protected $except = [
|
|
||||||
//
|
|
||||||
'/access/*',
|
|
||||||
'/access',
|
|
||||||
];
|
|
||||||
}
|
|
||||||
+20
-22
@@ -6,45 +6,43 @@ namespace App\Models;
|
|||||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
use Laravel\Sanctum\HasApiTokens;
|
|
||||||
|
|
||||||
class User extends Authenticatable
|
class User extends Authenticatable
|
||||||
{
|
{
|
||||||
use HasApiTokens, HasFactory, Notifiable;
|
/** @use HasFactory<\Database\Factories\UserFactory> */
|
||||||
|
use HasFactory, Notifiable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that are mass assignable.
|
* The attributes that are mass assignable.
|
||||||
*
|
*
|
||||||
* @var array<int, string>
|
* @var list<string>
|
||||||
*/
|
*/
|
||||||
// protected $fillable = [
|
|
||||||
// 'name',
|
|
||||||
// 'email',
|
|
||||||
// 'password',
|
|
||||||
// ];
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'login',
|
'name',
|
||||||
|
'email',
|
||||||
|
'password',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be hidden for serialization.
|
* The attributes that should be hidden for serialization.
|
||||||
*
|
*
|
||||||
* @var array<int, string>
|
* @var list<string>
|
||||||
*/
|
*/
|
||||||
// protected $hidden = [
|
protected $hidden = [
|
||||||
// 'password',
|
'password',
|
||||||
// 'remember_token',
|
'remember_token',
|
||||||
// ];
|
];
|
||||||
protected $hidden = [];
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attributes that should be cast.
|
* Get the attributes that should be cast.
|
||||||
*
|
*
|
||||||
* @var array<string, string>
|
* @return array<string, string>
|
||||||
*/
|
*/
|
||||||
protected $casts = [
|
protected function casts(): array
|
||||||
'email_verified_at' => 'datetime',
|
{
|
||||||
'password' => 'hashed',
|
return [
|
||||||
];
|
'email_verified_at' => 'datetime',
|
||||||
|
'password' => 'hashed',
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Providers;
|
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
|
||||||
use App\Services\AuthorizationService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Провайдер для регистрации сервиса авторизации
|
|
||||||
*/
|
|
||||||
class AuthorizationServiceProvider extends ServiceProvider
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Register services.
|
|
||||||
*/
|
|
||||||
public function register(): void
|
|
||||||
{
|
|
||||||
$this->app->bind(AuthorizationService::class, function($app) {
|
|
||||||
return new AuthorizationService();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bootstrap services.
|
|
||||||
*/
|
|
||||||
public function boot(): void
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Providers;
|
|
||||||
|
|
||||||
use Illuminate\Support\ServiceProvider;
|
|
||||||
use App\Services\UserService;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Провайдер для регистрации сервиса работы с данными юзера (установка логина, групп, подмена значений в случае работы на тестовой среде)
|
|
||||||
*/
|
|
||||||
class UserServiceProvider extends ServiceProvider
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Register services.
|
|
||||||
*/
|
|
||||||
public function register(): void
|
|
||||||
{
|
|
||||||
$this->app->singleton(UserService::class, function($app){
|
|
||||||
return new UserService;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Bootstrap services.
|
|
||||||
*/
|
|
||||||
public function boot(): void
|
|
||||||
{
|
|
||||||
//
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,86 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Services;
|
|
||||||
|
|
||||||
use App\Models\MagicApps;
|
|
||||||
use App\Facades\UserContext;
|
|
||||||
|
|
||||||
class AuthorizationService
|
|
||||||
{
|
|
||||||
private $appWithRoles;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Получаем приложения вместе с ролями
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getUserAppPermissions(): array
|
|
||||||
{
|
|
||||||
$this->appWithRoles = MagicApps::with('appRoles')->get()->toArray();
|
|
||||||
//Итоговый массив с доступами пользователя к приложению и ролью
|
|
||||||
$userAppAccess = [];
|
|
||||||
foreach ($this->appWithRoles as $appData) {
|
|
||||||
//Определяем по какому массиву проверять доступ к приложению - почтовые рассылки или группы AD
|
|
||||||
if (empty($appData['access_groups_email'])) {
|
|
||||||
$appAccess = explode(';', $appData['access_groups_ad']);
|
|
||||||
$userAccessGroups = UserContext::getUserADGroups();
|
|
||||||
} else {
|
|
||||||
$appAccess = explode(';', $appData['access_groups_email']);
|
|
||||||
$userAccessGroups = UserContext::getUserEmails();
|
|
||||||
}
|
|
||||||
//Если пересечения групп доступа приложения и групп доступа пользователя отсутствуют, считаем, что доступа нет
|
|
||||||
if (empty(array_intersect($appAccess, $userAccessGroups))) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
//Если ролевая модель отсутствует для приложения как таковая, прописывам значение null
|
|
||||||
if (empty($appData['app_roles'])) {
|
|
||||||
$userAppAccess[$appData['app_name']] = null;
|
|
||||||
} else {
|
|
||||||
//Если ролевая модель существует, ставим значение false, которое будет заменено ролью пользователя. Сохранение false на выходе, в свою очередь, сигнализирует, что роль пользователя не определилась
|
|
||||||
$userAppAccess[$appData['app_name']] = false;
|
|
||||||
foreach ($appData['app_roles'] as $roleData) {
|
|
||||||
if($this->checkRoleAccess($appData['role_driver'], explode(';', $roleData['role_access']))) {
|
|
||||||
$userAppAccess[$appData['app_name']] = $roleData['app_role'];
|
|
||||||
//Все роли идут по приоритету важности, поэтому останавливаемся на самой важной и возвращаем ее, остальные роли не перебираем. Я пока не уверен как лучше организовать отображение функционала ролей в приложениях: весь нужный функционал "класть" в одну роль и отображать строго тот функционал, который относится к роли. Или распределять функционал между ролями и, если пользователь входит в несколько ролей, отображать весь функционал всех ролей, куда он может входить. В случае последнего варианта, нужно будет хранить все доступные роли пользователя, а не только самую важную по приортету.
|
|
||||||
//Также пока непонятно, реализовывать ли возможность переключаться между ролями на продакшн среде. Если реализовывать, так же придется хранить все роли, куда входит пользователь. Но в этом случае есть риски запутаться в логировании, например, если пользователь под ролью админ переключится на пользователя юзер и совершит от него действие
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return $userAppAccess;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Возвращаем результат проверки доступности роли
|
|
||||||
*
|
|
||||||
* @param string $roleAccessDriver название драйвера доступа роли
|
|
||||||
* @param array $roleData массив с перечисленными рассылками/логинами/группами, которым доступна роль
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function checkRoleAccess(string $roleAccessDriver, array $roleData): bool
|
|
||||||
{
|
|
||||||
switch ($roleAccessDriver) {
|
|
||||||
case 'login':
|
|
||||||
return in_array(UserContext::getUserLogin(), $roleData);
|
|
||||||
break;
|
|
||||||
case 'email':
|
|
||||||
return !empty(array_intersect(UserContext::getUserEmails(), $roleData));
|
|
||||||
break;
|
|
||||||
case 'ADgroup':
|
|
||||||
return !empty(array_intersect(UserContext::getUserADGroups(), $roleData));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//УДАЛИТЬ
|
|
||||||
// public function getUserAppRoles(array $userGroups)
|
|
||||||
// {
|
|
||||||
// $userEmails = session()->get('_auth_groups');
|
|
||||||
// $userLogin = session()->get('_auth_login');
|
|
||||||
// $magicApps = $this->getAppRoles();
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,198 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace App\Services;
|
|
||||||
|
|
||||||
use Exception;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Сервис работы с данными юзера (установка/получение логина, групп, подмена значений в случае работы на тестовой среде)
|
|
||||||
*/
|
|
||||||
class UserService
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var string пользовательский логин
|
|
||||||
*/
|
|
||||||
public string $userLogin;
|
|
||||||
/**
|
|
||||||
* @var array пользовательские группы AD
|
|
||||||
*/
|
|
||||||
public array $userADGroups;
|
|
||||||
/**
|
|
||||||
* @var array почтовые рассылки куда входит пользователь
|
|
||||||
*/
|
|
||||||
public array $userEmails;
|
|
||||||
/**
|
|
||||||
* @var boolean является ли пользователь админом приложения Magic
|
|
||||||
*/
|
|
||||||
public bool $isAdmin;
|
|
||||||
/**
|
|
||||||
* @var array доступы пользователя к приложениям
|
|
||||||
*/
|
|
||||||
public array $userAppPermissions;
|
|
||||||
/**
|
|
||||||
* @var int идентификатор пользователя из таблицы users
|
|
||||||
*/
|
|
||||||
public int $userId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Установка пользовательского логина
|
|
||||||
*
|
|
||||||
* @param string $login логин для подмены превоначального значения, взятого из сессии
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setUserLogin(string $login): void
|
|
||||||
{
|
|
||||||
$this->userLogin = $login;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Установка пользовательского логина
|
|
||||||
*
|
|
||||||
* @param array $appRoles доступы пользователя к приложениям Magic
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setUserAppPermissions(array $appRoles): void
|
|
||||||
{
|
|
||||||
$this->userAppPermissions = $appRoles;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Установка пользовательского идентификатора из таблицы users
|
|
||||||
*
|
|
||||||
* @param int $userId идентификатор пользователя
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setUserId(int $userId): void
|
|
||||||
{
|
|
||||||
$this->userId = $userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Установка групп AD пользователя
|
|
||||||
*
|
|
||||||
* @param array $userGroups все группы из AD где состоит пользователь (emails, AD и т.д.)
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setUserADGroups(array $userGroups): void
|
|
||||||
{
|
|
||||||
$this->userADGroups = array_filter($userGroups, function($el){return substr($el, 0, 1) !== '#';});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Установка почтовых рассылок куда входит пользователь
|
|
||||||
*
|
|
||||||
* @param array $userGroups все групы пользователя AD, в которых он состоит (почтовые ящики, AD и т.д.)
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setUserEmails(array $userGroups): void
|
|
||||||
{
|
|
||||||
$this->userEmails = array_filter($userGroups, function($el){return substr($el, 0, 1) === '#';});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Устанавливаем флаг является ли пользователь админом приложения Magic
|
|
||||||
*
|
|
||||||
* @param boolean $flag
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function setIsAdminFlag(bool $flag): void
|
|
||||||
{
|
|
||||||
$this->isAdmin = $flag;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Добавление группы AD в массив групп пользователя
|
|
||||||
*
|
|
||||||
* @param string $group группа для добавления в массив установленных при аутентификации групп AD пользователя
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function addUserADGroup(string $group): void
|
|
||||||
{
|
|
||||||
$this->userADGroups[] = $group;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Добавление email в массив емейлов пользователя
|
|
||||||
*
|
|
||||||
* @param string $email почтовая рассылка для добавления в массив установленных при аутентификации почтовых ящиков пользователя
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function addUserEmail(string $email): void
|
|
||||||
{
|
|
||||||
$this->userEmails[] = $email;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Возвращаем доступы пользователя к приложениям Magic
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getUserAppPermissions(): array
|
|
||||||
{
|
|
||||||
return $this->userAppPermissions;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Получаем пользовательский логин
|
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getUserLogin(): string
|
|
||||||
{
|
|
||||||
return $this->userLogin;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Получаем пользовательский логин
|
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function getUserId(): int
|
|
||||||
{
|
|
||||||
return $this->userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Получаем пользовательский логин
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getUserADGroups(): array
|
|
||||||
{
|
|
||||||
return $this->userADGroups;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Получаем email рассылки куда он входит
|
|
||||||
*
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getUserEmails(): array
|
|
||||||
{
|
|
||||||
return $this->userEmails;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Получаем значение флага является ли пользователь админом приложения Magic
|
|
||||||
*
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
public function getIsAdminFlag(): bool
|
|
||||||
{
|
|
||||||
return $this->isAdmin;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,18 +1,53 @@
|
|||||||
#!/usr/bin/env php
|
#!/usr/bin/env php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Foundation\Application;
|
|
||||||
use Symfony\Component\Console\Input\ArgvInput;
|
|
||||||
|
|
||||||
define('LARAVEL_START', microtime(true));
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
// Register the Composer autoloader...
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader
|
||||||
|
| for our application. We just need to utilize it! We'll require it
|
||||||
|
| into the script here so that we do not have to worry about the
|
||||||
|
| loading of any of our classes manually. It's great to relax.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
require __DIR__.'/vendor/autoload.php';
|
require __DIR__.'/vendor/autoload.php';
|
||||||
|
|
||||||
// Bootstrap Laravel and handle the command...
|
|
||||||
/** @var Application $app */
|
|
||||||
$app = require_once __DIR__.'/bootstrap/app.php';
|
$app = require_once __DIR__.'/bootstrap/app.php';
|
||||||
|
|
||||||
$status = $app->handleCommand(new ArgvInput);
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Run The Artisan Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| When we run the console application, the current CLI command will be
|
||||||
|
| executed in this console and the response sent back to a terminal
|
||||||
|
| or another output device for the developers. Here goes nothing!
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
|
||||||
|
|
||||||
|
$status = $kernel->handle(
|
||||||
|
$input = new Symfony\Component\Console\Input\ArgvInput,
|
||||||
|
new Symfony\Component\Console\Output\ConsoleOutput
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Shutdown The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Once Artisan has finished running, we will fire off the shutdown events
|
||||||
|
| so that any final work may be done by the application before we shut
|
||||||
|
| down the process. This is the last thing to happen to the request.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$kernel->terminate($input, $status);
|
||||||
|
|
||||||
exit($status);
|
exit($status);
|
||||||
|
|||||||
+52
-15
@@ -1,18 +1,55 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Foundation\Application;
|
/*
|
||||||
use Illuminate\Foundation\Configuration\Exceptions;
|
|--------------------------------------------------------------------------
|
||||||
use Illuminate\Foundation\Configuration\Middleware;
|
| Create The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The first thing we will do is create a new Laravel application instance
|
||||||
|
| which serves as the "glue" for all the components of Laravel, and is
|
||||||
|
| the IoC container for the system binding all of the various parts.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
return Application::configure(basePath: dirname(__DIR__))
|
$app = new Illuminate\Foundation\Application(
|
||||||
->withRouting(
|
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
|
||||||
web: __DIR__.'/../routes/web.php',
|
);
|
||||||
commands: __DIR__.'/../routes/console.php',
|
|
||||||
health: '/up',
|
/*
|
||||||
)
|
|--------------------------------------------------------------------------
|
||||||
->withMiddleware(function (Middleware $middleware): void {
|
| Bind Important Interfaces
|
||||||
//
|
|--------------------------------------------------------------------------
|
||||||
})
|
|
|
||||||
->withExceptions(function (Exceptions $exceptions): void {
|
| Next, we need to bind some important interfaces into the container so
|
||||||
//
|
| we will be able to resolve them when needed. The kernels serve the
|
||||||
})->create();
|
| incoming requests to this application from both the web and CLI.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Http\Kernel::class,
|
||||||
|
App\Http\Kernel::class
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Console\Kernel::class,
|
||||||
|
App\Console\Kernel::class
|
||||||
|
);
|
||||||
|
|
||||||
|
$app->singleton(
|
||||||
|
Illuminate\Contracts\Debug\ExceptionHandler::class,
|
||||||
|
App\Exceptions\Handler::class
|
||||||
|
);
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Return The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This script returns the application instance. The instance is given to
|
||||||
|
| the calling script so we can separate the building of the instances
|
||||||
|
| from the actual running of the application and sending responses.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
return $app;
|
||||||
|
|||||||
+19
-33
@@ -1,27 +1,34 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://getcomposer.org/schema.json",
|
|
||||||
"name": "laravel/laravel",
|
"name": "laravel/laravel",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"description": "The skeleton application for the Laravel framework.",
|
"description": "The skeleton application for the Laravel framework.",
|
||||||
"keywords": ["laravel", "framework"],
|
"keywords": ["laravel", "framework"],
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2",
|
"php": "^8.1",
|
||||||
"laravel/framework": "^12.0",
|
"directorytree/ldaprecord-laravel": "^3.4",
|
||||||
"laravel/tinker": "^2.10.1"
|
"guzzlehttp/guzzle": "^7.2",
|
||||||
|
"laravel/framework": "^10.10",
|
||||||
|
"laravel/sanctum": "^3.3",
|
||||||
|
"laravel/tinker": "^2.8",
|
||||||
|
"laravel/ui": "^4.6",
|
||||||
|
"nwidart/laravel-modules": "^10.0",
|
||||||
|
"spatie/laravel-activitylog": "^4.10"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"fakerphp/faker": "^1.23",
|
"fakerphp/faker": "^1.9.1",
|
||||||
"laravel/pail": "^1.2.2",
|
"laravel/pint": "^1.0",
|
||||||
"laravel/pint": "^1.24",
|
"laravel/sail": "^1.18",
|
||||||
"laravel/sail": "^1.41",
|
"mockery/mockery": "^1.4.4",
|
||||||
"mockery/mockery": "^1.6",
|
"nunomaduro/collision": "^7.0",
|
||||||
"nunomaduro/collision": "^8.6",
|
"php-debugbar/php-debugbar": "^2.1",
|
||||||
"phpunit/phpunit": "^11.5.3"
|
"phpunit/phpunit": "^10.1",
|
||||||
|
"spatie/laravel-ignition": "^2.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"App\\": "app/",
|
"App\\": "app/",
|
||||||
|
"Modules\\": "Modules/",
|
||||||
"Database\\Factories\\": "database/factories/",
|
"Database\\Factories\\": "database/factories/",
|
||||||
"Database\\Seeders\\": "database/seeders/"
|
"Database\\Seeders\\": "database/seeders/"
|
||||||
}
|
}
|
||||||
@@ -32,22 +39,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"setup": [
|
|
||||||
"composer install",
|
|
||||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"",
|
|
||||||
"@php artisan key:generate",
|
|
||||||
"@php artisan migrate --force",
|
|
||||||
"npm install",
|
|
||||||
"npm run build"
|
|
||||||
],
|
|
||||||
"dev": [
|
|
||||||
"Composer\\Config::disableProcessTimeout",
|
|
||||||
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1 --timeout=0\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite --kill-others"
|
|
||||||
],
|
|
||||||
"test": [
|
|
||||||
"@php artisan config:clear --ansi",
|
|
||||||
"@php artisan test"
|
|
||||||
],
|
|
||||||
"post-autoload-dump": [
|
"post-autoload-dump": [
|
||||||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
|
||||||
"@php artisan package:discover --ansi"
|
"@php artisan package:discover --ansi"
|
||||||
@@ -59,12 +50,7 @@
|
|||||||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
|
||||||
],
|
],
|
||||||
"post-create-project-cmd": [
|
"post-create-project-cmd": [
|
||||||
"@php artisan key:generate --ansi",
|
"@php artisan key:generate --ansi"
|
||||||
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
|
|
||||||
"@php artisan migrate --graceful --ansi"
|
|
||||||
],
|
|
||||||
"pre-package-uninstall": [
|
|
||||||
"Illuminate\\Foundation\\ComposerScripts::prePackageUninstall"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"extra": {
|
"extra": {
|
||||||
|
|||||||
Generated
+2053
-1795
File diff suppressed because it is too large
Load Diff
+92
-23
@@ -1,5 +1,8 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Facade;
|
||||||
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -7,9 +10,9 @@ return [
|
|||||||
| Application Name
|
| Application Name
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This value is the name of your application, which will be used when the
|
| This value is the name of your application. This value is used when the
|
||||||
| framework needs to place the application's name in a notification or
|
| framework needs to place the application's name in a notification or
|
||||||
| other UI elements where an application name needs to be displayed.
|
| any other location as required by the application or its packages.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -48,24 +51,28 @@ return [
|
|||||||
|
|
|
|
||||||
| This URL is used by the console to properly generate URLs when using
|
| This URL is used by the console to properly generate URLs when using
|
||||||
| the Artisan command line tool. You should set this to the root of
|
| the Artisan command line tool. You should set this to the root of
|
||||||
| the application so that it's available within Artisan commands.
|
| your application so that it is used when running Artisan tasks.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'url' => env('APP_URL', 'http://localhost'),
|
'url' => env('APP_URL', 'http://localhost'),
|
||||||
|
|
||||||
|
'asset_url' => env('ASSET_URL'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Application Timezone
|
| Application Timezone
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may specify the default timezone for your application, which
|
| Here you may specify the default timezone for your application, which
|
||||||
| will be used by the PHP date and date-time functions. The timezone
|
| will be used by the PHP date and date-time functions. We have gone
|
||||||
| is set to "UTC" by default as it is suitable for most use cases.
|
| ahead and set this to a sensible default for you out of the box.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'timezone' => 'UTC',
|
#Гаврилов
|
||||||
|
//ПОМЕНЯТЬ НА ПРОДЕ
|
||||||
|
'timezone' => 'Europe/Moscow',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -73,37 +80,54 @@ return [
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| The application locale determines the default locale that will be used
|
| The application locale determines the default locale that will be used
|
||||||
| by Laravel's translation / localization methods. This option can be
|
| by the translation service provider. You are free to set this value
|
||||||
| set to any locale for which you plan to have translation strings.
|
| to any of the locales which will be supported by the application.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'locale' => env('APP_LOCALE', 'en'),
|
'locale' => 'ru',
|
||||||
|
'fallback_locale' => 'en', // Резервный язык (если перевод отсутствует)
|
||||||
|
|
||||||
'fallback_locale' => env('APP_FALLBACK_LOCALE', 'en'),
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Application Fallback Locale
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The fallback locale determines the locale to use when the current one
|
||||||
|
| is not available. You may change the value to correspond to any of
|
||||||
|
| the language folders that are provided through your application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
'faker_locale' => env('APP_FAKER_LOCALE', 'en_US'),
|
'fallback_locale' => 'en',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Faker Locale
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This locale will be used by the Faker PHP library when generating fake
|
||||||
|
| data for your database seeds. For example, this will be used to get
|
||||||
|
| localized telephone numbers, street address information and more.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'faker_locale' => 'en_US',
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Encryption Key
|
| Encryption Key
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This key is utilized by Laravel's encryption services and should be set
|
| This key is used by the Illuminate encrypter service and should be set
|
||||||
| to a random, 32 character string to ensure that all encrypted values
|
| to a random, 32 character string, otherwise these encrypted strings
|
||||||
| are secure. You should do this prior to deploying the application.
|
| will not be safe. Please do this before deploying an application!
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'cipher' => 'AES-256-CBC',
|
|
||||||
|
|
||||||
'key' => env('APP_KEY'),
|
'key' => env('APP_KEY'),
|
||||||
|
|
||||||
'previous_keys' => [
|
'cipher' => 'AES-256-CBC',
|
||||||
...array_filter(
|
|
||||||
explode(',', (string) env('APP_PREVIOUS_KEYS', ''))
|
|
||||||
),
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -119,8 +143,53 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'maintenance' => [
|
'maintenance' => [
|
||||||
'driver' => env('APP_MAINTENANCE_DRIVER', 'file'),
|
'driver' => 'file',
|
||||||
'store' => env('APP_MAINTENANCE_STORE', 'database'),
|
// 'store' => 'redis',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Autoloaded Service Providers
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The service providers listed here will be automatically loaded on the
|
||||||
|
| request to your application. Feel free to add your own services to
|
||||||
|
| this array to grant expanded functionality to your applications.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'providers' => ServiceProvider::defaultProviders()->merge([
|
||||||
|
/*
|
||||||
|
* Package Service Providers...
|
||||||
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Application Service Providers...
|
||||||
|
*/
|
||||||
|
App\Providers\AppServiceProvider::class,
|
||||||
|
App\Providers\AuthServiceProvider::class,
|
||||||
|
App\Providers\AuthorizationServiceProvider::class,
|
||||||
|
// App\Providers\BroadcastServiceProvider::class,
|
||||||
|
App\Providers\EventServiceProvider::class,
|
||||||
|
App\Providers\RouteServiceProvider::class,
|
||||||
|
])->toArray(),
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Class Aliases
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This array of class aliases will be registered when this application
|
||||||
|
| is started. However, feel free to register as many as you wish as
|
||||||
|
| the aliases are "lazy" loaded so they don't hinder performance.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'aliases' => Facade::defaultAliases()->merge([
|
||||||
|
// 'Example' => App\Facades\Example::class,
|
||||||
|
])->toArray(),
|
||||||
|
|
||||||
|
'test_env' => env('TEST_ENV'),
|
||||||
|
//Время жизни сессии
|
||||||
|
'session_life_time' => env('SESSION_LIFETIME'),
|
||||||
];
|
];
|
||||||
|
|||||||
+19
-28
@@ -7,15 +7,15 @@ return [
|
|||||||
| Authentication Defaults
|
| Authentication Defaults
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This option controls the default authentication "guard" and password
|
| This option defines the default authentication "guard" and password
|
||||||
| reset options for your application. You may change these defaults
|
| reset "broker" for your application. You may change these values
|
||||||
| as required, but they're a perfect start for most applications.
|
| as required, but they're a perfect start for most applications.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'defaults' => [
|
'defaults' => [
|
||||||
'guard' => 'web',
|
'guard' => env('AUTH_GUARD', 'web'),
|
||||||
'passwords' => 'users',
|
'passwords' => env('AUTH_PASSWORD_BROKER', 'users'),
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -25,11 +25,11 @@ return [
|
|||||||
|
|
|
|
||||||
| Next, you may define every authentication guard for your application.
|
| Next, you may define every authentication guard for your application.
|
||||||
| Of course, a great default configuration has been defined for you
|
| Of course, a great default configuration has been defined for you
|
||||||
| here which uses session storage and the Eloquent user provider.
|
| which utilizes session storage plus the Eloquent user provider.
|
||||||
|
|
|
|
||||||
| All authentication drivers have a user provider. This defines how the
|
| All authentication guards have a user provider, which defines how the
|
||||||
| users are actually retrieved out of your database or other storage
|
| users are actually retrieved out of your database or other storage
|
||||||
| mechanisms used by this application to persist your user's data.
|
| system used by the application. Typically, Eloquent is utilized.
|
||||||
|
|
|
|
||||||
| Supported: "session"
|
| Supported: "session"
|
||||||
|
|
|
|
||||||
@@ -38,11 +38,6 @@ return [
|
|||||||
'guards' => [
|
'guards' => [
|
||||||
'web' => [
|
'web' => [
|
||||||
'driver' => 'session',
|
'driver' => 'session',
|
||||||
'provider' => 'ldap',
|
|
||||||
],
|
|
||||||
// guard для аутентификации при запросе ендпоинтов API, а также для нормального логирования информации события обращения к API ендпоинтам
|
|
||||||
'sanctum' => [
|
|
||||||
'driver' => 'sanctum',
|
|
||||||
'provider' => 'users',
|
'provider' => 'users',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
@@ -52,12 +47,12 @@ return [
|
|||||||
| User Providers
|
| User Providers
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| All authentication drivers have a user provider. This defines how the
|
| All authentication guards have a user provider, which defines how the
|
||||||
| users are actually retrieved out of your database or other storage
|
| users are actually retrieved out of your database or other storage
|
||||||
| mechanisms used by this application to persist your user's data.
|
| system used by the application. Typically, Eloquent is utilized.
|
||||||
|
|
|
|
||||||
| If you have multiple user tables or models you may configure multiple
|
| If you have multiple user tables or models you may configure multiple
|
||||||
| sources which represent each model / table. These sources may then
|
| providers to represent the model / table. These providers may then
|
||||||
| be assigned to any extra authentication guards you have defined.
|
| be assigned to any extra authentication guards you have defined.
|
||||||
|
|
|
|
||||||
| Supported: "database", "eloquent"
|
| Supported: "database", "eloquent"
|
||||||
@@ -65,15 +60,11 @@ return [
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
'providers' => [
|
'providers' => [
|
||||||
'ldap' => [
|
|
||||||
'driver' => 'ldap',
|
|
||||||
'model' => LdapRecord\Models\ActiveDirectory\User::class,
|
|
||||||
],
|
|
||||||
//Провайдер для записи в БД минимальных данных пользователя: логина и его id. Нужен для корректной работы Sanctum
|
|
||||||
'users' => [
|
'users' => [
|
||||||
'driver' => 'eloquent',
|
'driver' => 'eloquent',
|
||||||
'model' => App\Models\User::class,
|
'model' => env('AUTH_MODEL', App\Models\User::class),
|
||||||
],
|
],
|
||||||
|
|
||||||
// 'users' => [
|
// 'users' => [
|
||||||
// 'driver' => 'database',
|
// 'driver' => 'database',
|
||||||
// 'table' => 'users',
|
// 'table' => 'users',
|
||||||
@@ -85,9 +76,9 @@ return [
|
|||||||
| Resetting Passwords
|
| Resetting Passwords
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| You may specify multiple password reset configurations if you have more
|
| These configuration options specify the behavior of Laravel's password
|
||||||
| than one user table or model in the application and you want to have
|
| reset functionality, including the table utilized for token storage
|
||||||
| separate password reset settings based on the specific user types.
|
| and the user provider that is invoked to actually retrieve users.
|
||||||
|
|
|
|
||||||
| The expiry time is the number of minutes that each reset token will be
|
| The expiry time is the number of minutes that each reset token will be
|
||||||
| considered valid. This security feature keeps tokens short-lived so
|
| considered valid. This security feature keeps tokens short-lived so
|
||||||
@@ -102,7 +93,7 @@ return [
|
|||||||
'passwords' => [
|
'passwords' => [
|
||||||
'users' => [
|
'users' => [
|
||||||
'provider' => 'users',
|
'provider' => 'users',
|
||||||
'table' => 'password_reset_tokens',
|
'table' => env('AUTH_PASSWORD_RESET_TOKEN_TABLE', 'password_reset_tokens'),
|
||||||
'expire' => 60,
|
'expire' => 60,
|
||||||
'throttle' => 60,
|
'throttle' => 60,
|
||||||
],
|
],
|
||||||
@@ -113,12 +104,12 @@ return [
|
|||||||
| Password Confirmation Timeout
|
| Password Confirmation Timeout
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may define the amount of seconds before a password confirmation
|
| Here you may define the number of seconds before a password confirmation
|
||||||
| times out and the user is prompted to re-enter their password via the
|
| window expires and users are asked to re-enter their password via the
|
||||||
| confirmation screen. By default, the timeout lasts for three hours.
|
| confirmation screen. By default, the timeout lasts for three hours.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'password_timeout' => 10800,
|
'password_timeout' => env('AUTH_PASSWORD_TIMEOUT', 10800),
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
+16
-22
@@ -9,13 +9,13 @@ return [
|
|||||||
| Default Cache Store
|
| Default Cache Store
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| This option controls the default cache store that will be used by the
|
| This option controls the default cache connection that gets used while
|
||||||
| framework. This connection is utilized if another isn't explicitly
|
| using this caching library. This connection is used when another is
|
||||||
| specified when running a cache operation inside the application.
|
| not explicitly specified when executing a given caching function.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('CACHE_STORE', 'database'),
|
'default' => env('CACHE_DRIVER', 'file'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
@@ -26,14 +26,17 @@ return [
|
|||||||
| well as their drivers. You may even define multiple stores for the
|
| well as their drivers. You may even define multiple stores for the
|
||||||
| same cache driver to group types of items stored in your caches.
|
| same cache driver to group types of items stored in your caches.
|
||||||
|
|
|
|
||||||
| Supported drivers: "array", "database", "file", "memcached",
|
| Supported drivers: "apc", "array", "database", "file",
|
||||||
| "redis", "dynamodb", "octane",
|
| "memcached", "redis", "dynamodb", "octane", "null"
|
||||||
| "failover", "null"
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'stores' => [
|
'stores' => [
|
||||||
|
|
||||||
|
'apc' => [
|
||||||
|
'driver' => 'apc',
|
||||||
|
],
|
||||||
|
|
||||||
'array' => [
|
'array' => [
|
||||||
'driver' => 'array',
|
'driver' => 'array',
|
||||||
'serialize' => false,
|
'serialize' => false,
|
||||||
@@ -41,10 +44,9 @@ return [
|
|||||||
|
|
||||||
'database' => [
|
'database' => [
|
||||||
'driver' => 'database',
|
'driver' => 'database',
|
||||||
'connection' => env('DB_CACHE_CONNECTION'),
|
'table' => 'cache',
|
||||||
'table' => env('DB_CACHE_TABLE', 'cache'),
|
'connection' => null,
|
||||||
'lock_connection' => env('DB_CACHE_LOCK_CONNECTION'),
|
'lock_connection' => null,
|
||||||
'lock_table' => env('DB_CACHE_LOCK_TABLE'),
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'file' => [
|
'file' => [
|
||||||
@@ -91,14 +93,6 @@ return [
|
|||||||
'driver' => 'octane',
|
'driver' => 'octane',
|
||||||
],
|
],
|
||||||
|
|
||||||
'failover' => [
|
|
||||||
'driver' => 'failover',
|
|
||||||
'stores' => [
|
|
||||||
'database',
|
|
||||||
'array',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -106,12 +100,12 @@ return [
|
|||||||
| Cache Key Prefix
|
| Cache Key Prefix
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| When utilizing the APC, database, memcached, Redis, and DynamoDB cache
|
| When utilizing the APC, database, memcached, Redis, or DynamoDB cache
|
||||||
| stores, there might be other applications using the same cache. For
|
| stores there might be other applications using the same cache. For
|
||||||
| that reason, you may prefix every cache key to avoid collisions.
|
| that reason, you may prefix every cache key to avoid collisions.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'prefix' => env('CACHE_PREFIX', Str::slug((string) env('APP_NAME', 'laravel')).'-cache-'),
|
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache_'),
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|||||||
+40
-43
@@ -10,22 +10,26 @@ return [
|
|||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Here you may specify which of the database connections below you wish
|
| Here you may specify which of the database connections below you wish
|
||||||
| to use as your default connection for database operations. This is
|
| to use as your default connection for all database work. Of course
|
||||||
| the connection which will be utilized unless another connection
|
| you may use many connections at once using the Database library.
|
||||||
| is explicitly specified when you execute a query / statement.
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'default' => env('DB_CONNECTION', 'sqlite'),
|
'default' => env('DB_CONNECTION', 'mysql'),
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Database Connections
|
| Database Connections
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Below are all of the database connections defined for your application.
|
| Here are each of the database connections setup for your application.
|
||||||
| An example configuration is provided for each database system which
|
| Of course, examples of configuring each database platform that is
|
||||||
| is supported by Laravel. You're free to add / remove connections.
|
| supported by Laravel is shown below to make development simple.
|
||||||
|
|
|
||||||
|
|
|
||||||
|
| All database work in Laravel is done through the PHP PDO facilities
|
||||||
|
| so make sure you have the driver for your particular database of
|
||||||
|
| choice installed on your machine before you begin development.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -33,80 +37,76 @@ return [
|
|||||||
|
|
||||||
'sqlite' => [
|
'sqlite' => [
|
||||||
'driver' => 'sqlite',
|
'driver' => 'sqlite',
|
||||||
'url' => env('DB_URL'),
|
'url' => env('DATABASE_URL'),
|
||||||
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
'database' => env('DB_DATABASE', database_path('database.sqlite')),
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
|
||||||
'busy_timeout' => null,
|
|
||||||
'journal_mode' => null,
|
|
||||||
'synchronous' => null,
|
|
||||||
'transaction_mode' => 'DEFERRED',
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'mysql' => [
|
'mysql' => [
|
||||||
'driver' => 'mysql',
|
'driver' => 'mysql',
|
||||||
'url' => env('DB_URL'),
|
'url' => env('DATABASE_URL'),
|
||||||
'host' => env('DB_HOST', '127.0.0.1'),
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
'port' => env('DB_PORT', '3306'),
|
'port' => env('DB_PORT', '3306'),
|
||||||
'database' => env('DB_DATABASE', 'laravel'),
|
'database' => env('DB_DATABASE'),
|
||||||
'username' => env('DB_USERNAME', 'root'),
|
'username' => env('DB_USERNAME', 'root'),
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'unix_socket' => env('DB_SOCKET', ''),
|
'unix_socket' => env('DB_SOCKET', ''),
|
||||||
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
'charset' => 'utf8mb4',
|
||||||
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
'collation' => 'utf8mb4_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'prefix_indexes' => true,
|
'prefix_indexes' => true,
|
||||||
'strict' => true,
|
'strict' => true,
|
||||||
'engine' => null,
|
'engine' => null,
|
||||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
(PHP_VERSION_ID >= 80500 ? \Pdo\Mysql::ATTR_SSL_CA : \PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
]) : [],
|
]) : [],
|
||||||
],
|
],
|
||||||
|
|
||||||
'mariadb' => [
|
'magic_old' => [
|
||||||
'driver' => 'mariadb',
|
'driver' => 'mysql',
|
||||||
'url' => env('DB_URL'),
|
'url' => env('DATABASE_URL'),
|
||||||
'host' => env('DB_HOST', '127.0.0.1'),
|
'host' => env('DB_OLD_HOST'),
|
||||||
'port' => env('DB_PORT', '3306'),
|
'port' => env('DB_OLD_PORT', '3306'),
|
||||||
'database' => env('DB_DATABASE', 'laravel'),
|
'database' => env('DB_OLD_DATABASE'),
|
||||||
'username' => env('DB_USERNAME', 'root'),
|
'username' => env('DB_OLD_USERNAME'),
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_OLD_PASSWORD'),
|
||||||
'unix_socket' => env('DB_SOCKET', ''),
|
'unix_socket' => env('DB_OLD_SOCKET', ''),
|
||||||
'charset' => env('DB_CHARSET', 'utf8mb4'),
|
'charset' => 'utf8mb4',
|
||||||
'collation' => env('DB_COLLATION', 'utf8mb4_unicode_ci'),
|
'collation' => 'utf8mb4_unicode_ci',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'prefix_indexes' => true,
|
'prefix_indexes' => true,
|
||||||
'strict' => true,
|
'strict' => true,
|
||||||
'engine' => null,
|
'engine' => null,
|
||||||
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
'options' => extension_loaded('pdo_mysql') ? array_filter([
|
||||||
(PHP_VERSION_ID >= 80500 ? \Pdo\Mysql::ATTR_SSL_CA : \PDO::MYSQL_ATTR_SSL_CA) => env('MYSQL_ATTR_SSL_CA'),
|
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
|
||||||
]) : [],
|
]) : [],
|
||||||
],
|
],
|
||||||
|
|
||||||
'pgsql' => [
|
'pgsql' => [
|
||||||
'driver' => 'pgsql',
|
'driver' => 'pgsql',
|
||||||
'url' => env('DB_URL'),
|
'url' => env('DATABASE_URL'),
|
||||||
'host' => env('DB_HOST', '127.0.0.1'),
|
'host' => env('DB_HOST', '127.0.0.1'),
|
||||||
'port' => env('DB_PORT', '5432'),
|
'port' => env('DB_PORT', '5432'),
|
||||||
'database' => env('DB_DATABASE', 'laravel'),
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
'username' => env('DB_USERNAME', 'root'),
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'charset' => env('DB_CHARSET', 'utf8'),
|
'charset' => 'utf8',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'prefix_indexes' => true,
|
'prefix_indexes' => true,
|
||||||
'search_path' => 'public',
|
'search_path' => 'public',
|
||||||
'sslmode' => env('DB_SSLMODE', 'prefer'),
|
'sslmode' => 'prefer',
|
||||||
],
|
],
|
||||||
|
|
||||||
'sqlsrv' => [
|
'sqlsrv' => [
|
||||||
'driver' => 'sqlsrv',
|
'driver' => 'sqlsrv',
|
||||||
'url' => env('DB_URL'),
|
'url' => env('DATABASE_URL'),
|
||||||
'host' => env('DB_HOST', 'localhost'),
|
'host' => env('DB_HOST', 'localhost'),
|
||||||
'port' => env('DB_PORT', '1433'),
|
'port' => env('DB_PORT', '1433'),
|
||||||
'database' => env('DB_DATABASE', 'laravel'),
|
'database' => env('DB_DATABASE', 'forge'),
|
||||||
'username' => env('DB_USERNAME', 'root'),
|
'username' => env('DB_USERNAME', 'forge'),
|
||||||
'password' => env('DB_PASSWORD', ''),
|
'password' => env('DB_PASSWORD', ''),
|
||||||
'charset' => env('DB_CHARSET', 'utf8'),
|
'charset' => 'utf8',
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'prefix_indexes' => true,
|
'prefix_indexes' => true,
|
||||||
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
// 'encrypt' => env('DB_ENCRYPT', 'yes'),
|
||||||
@@ -122,14 +122,11 @@ return [
|
|||||||
|
|
|
|
||||||
| This table keeps track of all the migrations that have already run for
|
| This table keeps track of all the migrations that have already run for
|
||||||
| your application. Using this information, we can determine which of
|
| your application. Using this information, we can determine which of
|
||||||
| the migrations on disk haven't actually been run on the database.
|
| the migrations on disk haven't actually been run in the database.
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
'migrations' => [
|
'migrations' => 'migrations',
|
||||||
'table' => 'migrations',
|
|
||||||
'update_date_on_publish' => true,
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|||||||
+7
-11
@@ -9,7 +9,7 @@ return [
|
|||||||
|
|
|
|
||||||
| Here you may specify the default filesystem disk that should be used
|
| Here you may specify the default filesystem disk that should be used
|
||||||
| by the framework. The "local" disk, as well as a variety of cloud
|
| by the framework. The "local" disk, as well as a variety of cloud
|
||||||
| based disks are available to your application for file storage.
|
| based disks are available to your application. Just store away!
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -20,11 +20,11 @@ return [
|
|||||||
| Filesystem Disks
|
| Filesystem Disks
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Below you may configure as many filesystem disks as necessary, and you
|
| Here you may configure as many filesystem "disks" as you wish, and you
|
||||||
| may even configure multiple disks for the same driver. Examples for
|
| may even configure multiple disks of the same driver. Defaults have
|
||||||
| most supported storage drivers are configured here for reference.
|
| been set up for each driver as an example of the required values.
|
||||||
|
|
|
|
||||||
| Supported drivers: "local", "ftp", "sftp", "s3"
|
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -32,19 +32,16 @@ return [
|
|||||||
|
|
||||||
'local' => [
|
'local' => [
|
||||||
'driver' => 'local',
|
'driver' => 'local',
|
||||||
'root' => storage_path('app/private'),
|
'root' => storage_path('app'),
|
||||||
'serve' => true,
|
|
||||||
'throw' => false,
|
'throw' => false,
|
||||||
'report' => false,
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'public' => [
|
'public' => [
|
||||||
'driver' => 'local',
|
'driver' => 'local',
|
||||||
'root' => storage_path('app/public'),
|
'root' => storage_path('app/public'),
|
||||||
'url' => rtrim(env('APP_URL', 'http://localhost'), '/').'/storage',
|
'url' => env('APP_URL').'/storage',
|
||||||
'visibility' => 'public',
|
'visibility' => 'public',
|
||||||
'throw' => false,
|
'throw' => false,
|
||||||
'report' => false,
|
|
||||||
],
|
],
|
||||||
|
|
||||||
's3' => [
|
's3' => [
|
||||||
@@ -57,7 +54,6 @@ return [
|
|||||||
'endpoint' => env('AWS_ENDPOINT'),
|
'endpoint' => env('AWS_ENDPOINT'),
|
||||||
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
|
||||||
'throw' => false,
|
'throw' => false,
|
||||||
'report' => false,
|
|
||||||
],
|
],
|
||||||
|
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Default Hash Driver
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option controls the default hash driver that will be used to hash
|
||||||
|
| passwords for your application. By default, the bcrypt algorithm is
|
||||||
|
| used; however, you remain free to modify this option if you wish.
|
||||||
|
|
|
||||||
|
| Supported: "bcrypt", "argon", "argon2id"
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'driver' => 'bcrypt',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Bcrypt Options
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the configuration options that should be used when
|
||||||
|
| passwords are hashed using the Bcrypt algorithm. This will allow you
|
||||||
|
| to control the amount of time it takes to hash the given password.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'bcrypt' => [
|
||||||
|
'rounds' => env('BCRYPT_ROUNDS', 12),
|
||||||
|
'verify' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Argon Options
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify the configuration options that should be used when
|
||||||
|
| passwords are hashed using the Argon algorithm. These will allow you
|
||||||
|
| to control the amount of time it takes to hash the given password.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'argon' => [
|
||||||
|
'memory' => 65536,
|
||||||
|
'threads' => 1,
|
||||||
|
'time' => 4,
|
||||||
|
'verify' => true,
|
||||||
|
],
|
||||||
|
|
||||||
|
];
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Default LDAP Connection Name
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here you may specify which of the LDAP connections below you wish
|
|
||||||
| to use as your default connection for all LDAP operations. Of
|
|
||||||
| course you may add as many connections you'd like below.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'default' => env('LDAP_CONNECTION', 'default'),
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| LDAP Connections
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Below you may configure each LDAP connection your application requires
|
|
||||||
| access to. Be sure to include a valid base DN - otherwise you may
|
|
||||||
| not receive any results when performing LDAP search operations.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'connections' => [
|
|
||||||
|
|
||||||
'default' => [
|
|
||||||
'hosts' => [env('LDAP_HOST', '127.0.0.1')],
|
|
||||||
'username' => env('LDAP_USERNAME', 'cn=user,dc=local,dc=com'),
|
|
||||||
'password' => env('LDAP_PASSWORD', 'secret'),
|
|
||||||
'port' => env('LDAP_PORT', 389),
|
|
||||||
'base_dn' => env('LDAP_BASE_DN', 'dc=local,dc=com'),
|
|
||||||
'timeout' => env('LDAP_TIMEOUT', 5),
|
|
||||||
'use_ssl' => env('LDAP_SSL', false),
|
|
||||||
'use_tls' => env('LDAP_TLS', false),
|
|
||||||
'use_sasl' => env('LDAP_SASL', false),
|
|
||||||
'sasl_options' => [
|
|
||||||
// 'mech' => 'GSSAPI',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| LDAP Logging
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| When LDAP logging is enabled, all LDAP search and authentication
|
|
||||||
| operations are logged using the default application logging
|
|
||||||
| driver. This can assist in debugging issues and more.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'logging' => [
|
|
||||||
'enabled' => env('LDAP_LOGGING', true),
|
|
||||||
'channel' => env('LOG_CHANNEL', 'stack'),
|
|
||||||
'level' => env('LOG_LEVEL', 'info'),
|
|
||||||
],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| LDAP Cache
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| LDAP caching enables the ability of caching search results using the
|
|
||||||
| query builder. This is great for running expensive operations that
|
|
||||||
| may take many seconds to complete, such as a pagination request.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'cache' => [
|
|
||||||
'enabled' => env('LDAP_CACHE', false),
|
|
||||||
'driver' => env('CACHE_DRIVER', 'file'),
|
|
||||||
],
|
|
||||||
|
|
||||||
];
|
|
||||||
@@ -1,85 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Laravel\Sanctum\Sanctum;
|
|
||||||
|
|
||||||
return [
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Stateful Domains
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Requests from the following domains / hosts will receive stateful API
|
|
||||||
| authentication cookies. Typically, these should include your local
|
|
||||||
| and production domains which access your API via a frontend SPA.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
#Гаврилов
|
|
||||||
//ЗДЕСЬ НУЖНО БУДЕТ ПЕРЕЧИСЛИТЬ ДОМЕНЫ (МЭДЖИКА например) ПЕРЕД ВЫНОСОМ В ПРОД
|
|
||||||
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', sprintf(
|
|
||||||
'%s%s',
|
|
||||||
'localhost,localhost:3000,127.0.0.1,127.0.0.1:8000,::1',
|
|
||||||
Sanctum::currentApplicationUrlWithPort()
|
|
||||||
))),
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Sanctum Guards
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This array contains the authentication guards that will be checked when
|
|
||||||
| Sanctum is trying to authenticate a request. If none of these guards
|
|
||||||
| are able to authenticate the request, Sanctum will use the bearer
|
|
||||||
| token that's present on an incoming request for authentication.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'guard' => ['web'],
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Expiration Minutes
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| This value controls the number of minutes until an issued token will be
|
|
||||||
| considered expired. This will override any values set in the token's
|
|
||||||
| "expires_at" attribute, but first-party sessions are not affected.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'expiration' => null,
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Token Prefix
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Sanctum can prefix new tokens in order to take advantage of numerous
|
|
||||||
| security scanning initiatives maintained by open source platforms
|
|
||||||
| that notify developers if they commit tokens into repositories.
|
|
||||||
|
|
|
||||||
| See: https://docs.github.com/en/code-security/secret-scanning/about-secret-scanning
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'token_prefix' => env('SANCTUM_TOKEN_PREFIX', ''),
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Sanctum Middleware
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| When authenticating your first-party SPA with Sanctum you may need to
|
|
||||||
| customize some of the middleware Sanctum uses while processing the
|
|
||||||
| request. You may change the middleware listed below as required.
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
'middleware' => [
|
|
||||||
'authenticate_session' => Laravel\Sanctum\Http\Middleware\AuthenticateSession::class,
|
|
||||||
'encrypt_cookies' => App\Http\Middleware\EncryptCookies::class,
|
|
||||||
'verify_csrf_token' => App\Http\Middleware\VerifyCsrfToken::class,
|
|
||||||
],
|
|
||||||
|
|
||||||
];
|
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| View Storage Paths
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Most templating systems load templates from disk. Here you may specify
|
||||||
|
| an array of paths that should be checked for your views. Of course
|
||||||
|
| the usual Laravel view path has already been registered for you.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'paths' => [
|
||||||
|
resource_path('views'),
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Compiled View Path
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| This option determines where all the compiled Blade templates will be
|
||||||
|
| stored for your application. Typically, this is within the storage
|
||||||
|
| directory. However, as usual, you are free to change this value.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'compiled' => env(
|
||||||
|
'VIEW_COMPILED_PATH',
|
||||||
|
realpath(storage_path('framework/views'))
|
||||||
|
),
|
||||||
|
|
||||||
|
];
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
-- custom.users definition
|
|
||||||
|
|
||||||
CREATE TABLE `users` (
|
|
||||||
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
|
|
||||||
`login` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Логин пользователя',
|
|
||||||
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
||||||
`email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
||||||
`email_verified_at` timestamp NULL DEFAULT NULL,
|
|
||||||
`password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
||||||
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
||||||
`created_at` timestamp NULL DEFAULT NULL,
|
|
||||||
`updated_at` timestamp NULL DEFAULT NULL,
|
|
||||||
PRIMARY KEY (`id`),
|
|
||||||
UNIQUE KEY `users_email_unique` (`email`)
|
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
INSERT INTO custom.users (login,name,email,email_verified_at,password,remember_token,created_at,updated_at) VALUES
|
|
||||||
('dgavrilov',NULL,NULL,NULL,NULL,NULL,'2025-11-09 16:50:05','2025-11-09 16:50:05'),
|
|
||||||
('developer',NULL,NULL,NULL,NULL,NULL,'2025-11-20 13:45:05','2025-11-20 13:45:05');
|
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines contain the default error messages used by
|
||||||
|
| the validator class. Some of these rules have multiple versions such
|
||||||
|
| as the size rules. Feel free to tweak each of these messages here.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'accepted' => 'Поле :attribute должно быть принято.',
|
||||||
|
'accepted_if' => 'The :attribute field must be accepted when :other is :value.',
|
||||||
|
'active_url' => 'The :attribute field must be a valid URL.',
|
||||||
|
'after' => 'The :attribute field must be a date after :date.',
|
||||||
|
'after_or_equal' => 'The :attribute field must be a date after or equal to :date.',
|
||||||
|
'alpha' => 'The :attribute field must only contain letters.',
|
||||||
|
'alpha_dash' => 'The :attribute field must only contain letters, numbers, dashes, and underscores.',
|
||||||
|
'alpha_num' => 'The :attribute field must only contain letters and numbers.',
|
||||||
|
'array' => 'The :attribute field must be an array.',
|
||||||
|
'ascii' => 'The :attribute field must only contain single-byte alphanumeric characters and symbols.',
|
||||||
|
'before' => 'The :attribute field must be a date before :date.',
|
||||||
|
'before_or_equal' => 'The :attribute field must be a date before or equal to :date.',
|
||||||
|
'between' => [
|
||||||
|
'array' => 'The :attribute field must have between :min and :max items.',
|
||||||
|
'file' => 'The :attribute field must be between :min and :max kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be between :min and :max.',
|
||||||
|
'string' => 'The :attribute field must be between :min and :max characters.',
|
||||||
|
],
|
||||||
|
'boolean' => 'The :attribute field must be true or false.',
|
||||||
|
'can' => 'The :attribute field contains an unauthorized value.',
|
||||||
|
'confirmed' => 'The :attribute field confirmation does not match.',
|
||||||
|
'current_password' => 'The password is incorrect.',
|
||||||
|
'date' => 'The :attribute field must be a valid date.',
|
||||||
|
'date_equals' => 'The :attribute field must be a date equal to :date.',
|
||||||
|
'date_format' => 'Некорректный формат поля :attribute. Допускается следующий формат: :format.',
|
||||||
|
'decimal' => 'The :attribute field must have :decimal decimal places.',
|
||||||
|
'declined' => 'The :attribute field must be declined.',
|
||||||
|
'declined_if' => 'The :attribute field must be declined when :other is :value.',
|
||||||
|
'different' => 'The :attribute field and :other must be different.',
|
||||||
|
'digits' => 'The :attribute field must be :digits digits.',
|
||||||
|
'digits_between' => 'The :attribute field must be between :min and :max digits.',
|
||||||
|
'dimensions' => 'The :attribute field has invalid image dimensions.',
|
||||||
|
'distinct' => 'The :attribute field has a duplicate value.',
|
||||||
|
'doesnt_end_with' => 'The :attribute field must not end with one of the following: :values.',
|
||||||
|
'doesnt_start_with' => 'The :attribute field must not start with one of the following: :values.',
|
||||||
|
'email' => 'The :attribute field must be a valid email address.',
|
||||||
|
'ends_with' => 'The :attribute field must end with one of the following: :values.',
|
||||||
|
'enum' => 'The selected :attribute is invalid.',
|
||||||
|
'exists' => 'The selected :attribute is invalid.',
|
||||||
|
'extensions' => 'The :attribute field must have one of the following extensions: :values.',
|
||||||
|
'file' => 'The :attribute field must be a file.',
|
||||||
|
'filled' => 'The :attribute field must have a value.',
|
||||||
|
'gt' => [
|
||||||
|
'array' => 'The :attribute field must have more than :value items.',
|
||||||
|
'file' => 'The :attribute field must be greater than :value kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be greater than :value.',
|
||||||
|
'string' => 'The :attribute field must be greater than :value characters.',
|
||||||
|
],
|
||||||
|
'gte' => [
|
||||||
|
'array' => 'The :attribute field must have :value items or more.',
|
||||||
|
'file' => 'The :attribute field must be greater than or equal to :value kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be greater than or equal to :value.',
|
||||||
|
'string' => 'The :attribute field must be greater than or equal to :value characters.',
|
||||||
|
],
|
||||||
|
'hex_color' => 'The :attribute field must be a valid hexadecimal color.',
|
||||||
|
'image' => 'The :attribute field must be an image.',
|
||||||
|
'in' => 'Недопустимое значение поля :attribute.',
|
||||||
|
'in_array' => 'The :attribute field must exist in :other.',
|
||||||
|
'integer' => 'The :attribute field must be an integer.',
|
||||||
|
'ip' => 'The :attribute field must be a valid IP address.',
|
||||||
|
'ipv4' => 'The :attribute field must be a valid IPv4 address.',
|
||||||
|
'ipv6' => 'The :attribute field must be a valid IPv6 address.',
|
||||||
|
'json' => 'The :attribute field must be a valid JSON string.',
|
||||||
|
'lowercase' => 'The :attribute field must be lowercase.',
|
||||||
|
'lt' => [
|
||||||
|
'array' => 'The :attribute field must have less than :value items.',
|
||||||
|
'file' => 'The :attribute field must be less than :value kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be less than :value.',
|
||||||
|
'string' => 'The :attribute field must be less than :value characters.',
|
||||||
|
],
|
||||||
|
'lte' => [
|
||||||
|
'array' => 'The :attribute field must not have more than :value items.',
|
||||||
|
'file' => 'The :attribute field must be less than or equal to :value kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be less than or equal to :value.',
|
||||||
|
'string' => 'The :attribute field must be less than or equal to :value characters.',
|
||||||
|
],
|
||||||
|
'mac_address' => 'The :attribute field must be a valid MAC address.',
|
||||||
|
'max' => [
|
||||||
|
'array' => 'The :attribute field must not have more than :max items.',
|
||||||
|
'file' => 'The :attribute field must not be greater than :max kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must not be greater than :max.',
|
||||||
|
'string' => 'Значение поля :attribute не должно быть больше :max символов.',
|
||||||
|
],
|
||||||
|
'max_digits' => 'The :attribute field must not have more than :max digits.',
|
||||||
|
'mimes' => 'The :attribute field must be a file of type: :values.',
|
||||||
|
'mimetypes' => 'The :attribute field must be a file of type: :values.',
|
||||||
|
'min' => [
|
||||||
|
'array' => 'The :attribute field must have at least :min items.',
|
||||||
|
'file' => 'The :attribute field must be at least :min kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be at least :min.',
|
||||||
|
'string' => 'The :attribute field must be at least :min characters.',
|
||||||
|
],
|
||||||
|
'min_digits' => 'The :attribute field must have at least :min digits.',
|
||||||
|
'missing' => 'The :attribute field must be missing.',
|
||||||
|
'missing_if' => 'The :attribute field must be missing when :other is :value.',
|
||||||
|
'missing_unless' => 'The :attribute field must be missing unless :other is :value.',
|
||||||
|
'missing_with' => 'The :attribute field must be missing when :values is present.',
|
||||||
|
'missing_with_all' => 'The :attribute field must be missing when :values are present.',
|
||||||
|
'multiple_of' => 'The :attribute field must be a multiple of :value.',
|
||||||
|
'not_in' => 'The selected :attribute is invalid.',
|
||||||
|
'not_regex' => 'The :attribute field format is invalid.',
|
||||||
|
'numeric' => 'The :attribute field must be a number.',
|
||||||
|
'password' => [
|
||||||
|
'letters' => 'The :attribute field must contain at least one letter.',
|
||||||
|
'mixed' => 'The :attribute field must contain at least one uppercase and one lowercase letter.',
|
||||||
|
'numbers' => 'The :attribute field must contain at least one number.',
|
||||||
|
'symbols' => 'The :attribute field must contain at least one symbol.',
|
||||||
|
'uncompromised' => 'The given :attribute has appeared in a data leak. Please choose a different :attribute.',
|
||||||
|
],
|
||||||
|
'present' => 'The :attribute field must be present.',
|
||||||
|
'present_if' => 'The :attribute field must be present when :other is :value.',
|
||||||
|
'present_unless' => 'The :attribute field must be present unless :other is :value.',
|
||||||
|
'present_with' => 'The :attribute field must be present when :values is present.',
|
||||||
|
'present_with_all' => 'The :attribute field must be present when :values are present.',
|
||||||
|
'prohibited' => 'Поле :attribute не должно передаваться.',
|
||||||
|
'prohibited_if' => 'The :attribute field is prohibited when :other is :value.',
|
||||||
|
'prohibited_unless' => 'The :attribute field is prohibited unless :other is in :values.',
|
||||||
|
'prohibits' => 'The :attribute field prohibits :other from being present.',
|
||||||
|
'regex' => 'Недопустимый формат поля :attribute.',
|
||||||
|
'required' => 'Поле :attribute обязательно должно быть заполнено.',
|
||||||
|
'required_array_keys' => 'The :attribute field must contain entries for: :values.',
|
||||||
|
'required_if' => 'The :attribute field is required when :other is :value.',
|
||||||
|
'required_if_accepted' => 'The :attribute field is required when :other is accepted.',
|
||||||
|
'required_unless' => 'The :attribute field is required unless :other is in :values.',
|
||||||
|
'required_with' => 'The :attribute field is required when :values is present.',
|
||||||
|
'required_with_all' => 'The :attribute field is required when :values are present.',
|
||||||
|
'required_without' => 'The :attribute field is required when :values is not present.',
|
||||||
|
'required_without_all' => 'The :attribute field is required when none of :values are present.',
|
||||||
|
'same' => 'The :attribute field must match :other.',
|
||||||
|
'size' => [
|
||||||
|
'array' => 'The :attribute field must contain :size items.',
|
||||||
|
'file' => 'The :attribute field must be :size kilobytes.',
|
||||||
|
'numeric' => 'The :attribute field must be :size.',
|
||||||
|
'string' => 'The :attribute field must be :size characters.',
|
||||||
|
],
|
||||||
|
'starts_with' => 'The :attribute field must start with one of the following: :values.',
|
||||||
|
'string' => 'The :attribute field must be a string.',
|
||||||
|
'timezone' => 'The :attribute field must be a valid timezone.',
|
||||||
|
'unique' => 'The :attribute has already been taken.',
|
||||||
|
'uploaded' => 'The :attribute failed to upload.',
|
||||||
|
'uppercase' => 'The :attribute field must be uppercase.',
|
||||||
|
'url' => 'The :attribute field must be a valid URL.',
|
||||||
|
'ulid' => 'The :attribute field must be a valid ULID.',
|
||||||
|
'uuid' => 'The :attribute field must be a valid UUID.',
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Language Lines
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may specify custom validation messages for attributes using the
|
||||||
|
| convention "attribute.rule" to name the lines. This makes it quick to
|
||||||
|
| specify a specific custom language line for a given attribute rule.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'custom' => [
|
||||||
|
'attribute-name' => [
|
||||||
|
'rule-name' => 'custom-message',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Custom Validation Attributes
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| The following language lines are used to swap our attribute placeholder
|
||||||
|
| with something more reader friendly such as "E-Mail Address" instead
|
||||||
|
| of "email". This simply helps us make our message more expressive.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'attributes' => [],
|
||||||
|
|
||||||
|
];
|
||||||
Generated
+3555
File diff suppressed because it is too large
Load Diff
+30
-9
@@ -1,17 +1,38 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://www.schemastore.org/package.json",
|
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "vite build",
|
"dev": "vite",
|
||||||
"dev": "vite"
|
"build": "vite build"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tailwindcss/vite": "^4.0.0",
|
"@popperjs/core": "^2.11.6",
|
||||||
"axios": "^1.11.0",
|
"@types/react": "^19.1.8",
|
||||||
"concurrently": "^9.0.1",
|
"@types/react-dom": "^19.1.6",
|
||||||
"laravel-vite-plugin": "^2.0.0",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
"tailwindcss": "^4.0.0",
|
"axios": "^1.13.2",
|
||||||
"vite": "^7.0.7"
|
"bootstrap": "^5.2.3",
|
||||||
|
"globby": "^14.1.0",
|
||||||
|
"laravel-vite-plugin": "^1.2.0",
|
||||||
|
"react": "18.2.0",
|
||||||
|
"react-dom": "18.2.0",
|
||||||
|
"resolve-url-loader": "^5.0.0",
|
||||||
|
"typescript": "^5.8.3",
|
||||||
|
"vite": "^6.2.1"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@date-io/date-fns": "^2.14.0",
|
||||||
|
"@emotion/react": "^11.14.0",
|
||||||
|
"@emotion/styled": "^11.14.1",
|
||||||
|
"@fortawesome/fontawesome-free": "^7.0.1",
|
||||||
|
"@mui/material": "^5.18.0",
|
||||||
|
"@mui/x-tree-view": "^6.17.0",
|
||||||
|
"@SharePoint/rencredit_uikit": "^1.0.234",
|
||||||
|
"date-fns": "^2.30.0",
|
||||||
|
"dompurify": "^3.2.6",
|
||||||
|
"react-dropzone": "^14.3.8",
|
||||||
|
"react-imask": "^6.6.3",
|
||||||
|
"react-number-format": "^5.4.4",
|
||||||
|
"uuid": "^9.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,6 @@
|
|||||||
RewriteCond %{HTTP:Authorization} .
|
RewriteCond %{HTTP:Authorization} .
|
||||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||||
|
|
||||||
# Handle X-XSRF-Token Header
|
|
||||||
RewriteCond %{HTTP:x-xsrf-token} .
|
|
||||||
RewriteRule .* - [E=HTTP_X_XSRF_TOKEN:%{HTTP:X-XSRF-Token}]
|
|
||||||
|
|
||||||
# Redirect Trailing Slashes If Not A Folder...
|
# Redirect Trailing Slashes If Not A Folder...
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_URI} (.+)/$
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
|
|||||||
@@ -0,0 +1,664 @@
|
|||||||
|
<mxfile>
|
||||||
|
<diagram id="YrEqY51DlFa1ZGKHTR-x" name="Страница — 1">
|
||||||
|
<mxGraphModel dx="1852" dy="1862" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="0" />
|
||||||
|
<mxCell id="1" parent="0" />
|
||||||
|
<mxCell id="10" value="Middleware\web\<br>AuthetnticateMagic" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="370" y="10" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="12" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" parent="1" source="18" target="10" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="430" y="170" as="sourcePoint" />
|
||||||
|
<mxPoint x="205" y="70" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="18" value="Сессия <br>стартована" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="375" y="200" width="110" height="70" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="20" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#000000;fillColor=#d5e8d4;strokeWidth=1;" parent="1" source="18" target="28" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="510" y="280" as="sourcePoint" />
|
||||||
|
<mxPoint x="540" y="350" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="21" value="Да" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" parent="20" vertex="1" connectable="0">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="12" y="-2" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="23" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#fff2cc;strokeColor=#000000;strokeWidth=1;" parent="1" source="18" target="77" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="250" y="360" as="sourcePoint" />
|
||||||
|
<mxPoint x="320" y="350" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="24" value="Нет" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" parent="23" vertex="1" connectable="0">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="17" y="-77" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="29" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0;exitY=0.5;exitDx=0;exitDy=0;strokeColor=light-dark(#000000, #446e2c);fillColor=#d5e8d4;strokeWidth=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="28" target="31" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="460" y="590" as="sourcePoint" />
|
||||||
|
<mxPoint x="420" y="520" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="30" value="Нет" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" parent="29" vertex="1" connectable="0">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-30" y="-14" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="31" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="347.5" y="440" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="33" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endFill=1;edgeStyle=orthogonalEdgeStyle;" parent="1" source="31" target="77" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="440" y="1075" as="sourcePoint" />
|
||||||
|
<mxPoint x="205" y="560" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="36" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fillColor=#fff2cc;strokeColor=#000000;strokeWidth=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" parent="1" source="28" target="39" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="665" y="580" as="sourcePoint" />
|
||||||
|
<mxPoint x="670" y="560" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="37" value="Да" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" parent="36" vertex="1" connectable="0">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="14" y="-27" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="38" value="Controller\<br>LoginController" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="740" y="10" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="39" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="420" y="500" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="40" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;edgeStyle=orthogonalEdgeStyle;" parent="1" source="39" target="43" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="825" y="620" as="sourcePoint" />
|
||||||
|
<mxPoint x="840" y="560" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="41" value="Проводим аутентификацию<br>&nbsp;через LDAP" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="40" vertex="1" connectable="0">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-130" y="-22" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="43" value="Аутентификация <br>LDAP успешна" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="728.75" y="560" width="142.5" height="70" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="44" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=light-dark(#000000, #446e2c);fillColor=#d5e8d4;strokeWidth=1;" parent="1" source="43" target="51" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="880" y="660" as="sourcePoint" />
|
||||||
|
<mxPoint x="918" y="720" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="45" value="Да" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" parent="44" vertex="1" connectable="0">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-28" y="-7" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="46" value="" style="endArrow=classicThin;html=1;edgeStyle=orthogonalEdgeStyle;fillColor=#fff2cc;strokeColor=light-dark(#000000, #6d5100);strokeWidth=1;endFill=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="43" target="77" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="770" y="640" as="sourcePoint" />
|
||||||
|
<mxPoint x="849.375" y="685" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="760" y="595" />
|
||||||
|
<mxPoint x="760" y="595" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="47" value="Нет" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" parent="46" vertex="1" connectable="0">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="118" y="-18" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="50" value="Session" style="rounded=1;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="1100" y="10" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="51" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="789.38" y="665" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="52" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="1150" y="665" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="53" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" parent="1" source="51" target="52" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1000" y="674.5" as="sourcePoint" />
|
||||||
|
<mxPoint x="1170" y="674.5" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="54" value="Помещаем логин и <br>группы пользователя <br>в сессию" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="53" vertex="1" connectable="0">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-83" y="-27" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="55" value="" style="endArrow=none;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" parent="1" source="150" target="136" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="920" y="850" as="sourcePoint" />
|
||||||
|
<mxPoint x="909" y="820" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="60" value="" style="rounded=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="1150" y="315" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="65" value="" style="endArrow=classic;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;" parent="1" source="60" target="28" edge="1">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="990" y="760" as="sourcePoint" />
|
||||||
|
<mxPoint x="550" y="380" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="66" value="web/api" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-240" y="95" width="80" height="80" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="67" value="Middleware\web\<br>AuthetnticateMagicApi" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="130" y="5" width="135" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="70" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="187.5" y="115" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="71" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="70" target="67">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="250" y="230" as="sourcePoint" />
|
||||||
|
<mxPoint x="240" y="100" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="72" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1" source="66" target="70">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="110" y="120" as="sourcePoint" />
|
||||||
|
<mxPoint x="90" y="200" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="73" value="api ендпоинт" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="72">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-156" y="-12" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="74" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;edgeStyle=orthogonalEdgeStyle;jumpStyle=arc;" edge="1" parent="1" source="66" target="18">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="130" y="160" as="sourcePoint" />
|
||||||
|
<mxPoint x="420" y="190" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="75" value="web роут" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="74">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-317" y="-14" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="76" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="155" target="70">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="245" y="500" as="sourcePoint" />
|
||||||
|
<mxPoint x="244.5" y="220" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="77" value="views\login" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="240" y="585" width="140" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="87" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="43" target="38">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="800" y="530" as="sourcePoint" />
|
||||||
|
<mxPoint x="390" y="80" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="88" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="60" target="50">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="860" y="540" as="sourcePoint" />
|
||||||
|
<mxPoint x="860" y="80" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="1160" y="220" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="89" value="" style="endArrow=none;dashed=1;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="113" target="52">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1170" y="385" as="sourcePoint" />
|
||||||
|
<mxPoint x="1150" y="510" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="141" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.375;entryY=0;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;endArrow=none;endFill=0;dashed=1;" edge="1" parent="1" source="90" target="142">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1560" y="40" as="sourcePoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="90" value="users" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1490" width="60" height="80" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="91" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="92" target="90">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1260" y="600" as="sourcePoint" />
|
||||||
|
<mxPoint x="1100" y="80" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="205" value="" style="edgeStyle=none;html=1;dashed=1;endArrow=none;endFill=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="92" target="206">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1537.2727272727275" y="930" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="92" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1510" y="745" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="96" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="790" y="745" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="97" value="" style="endArrow=none;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="96" target="51">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="930" y="850" as="sourcePoint" />
|
||||||
|
<mxPoint x="930" y="660" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="98" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;jumpStyle=arc;" edge="1" parent="1" source="96" target="92">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="990" y="640" as="sourcePoint" />
|
||||||
|
<mxPoint x="1160" y="640" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="99" value="Создаем запись с логином пользователя в модели users, <br>если аутентификация проходит впервые<br>(нужно для работы Sanctum)" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=light-dark(#FFFFFF,#EDEDED);" vertex="1" connectable="0" parent="98">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-235" y="-27" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="101" value="personal_access_tokens" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1640" y="5" width="160" height="70" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="102" value="модель с токенами <br>доступа Sanctum" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1655" y="-40" width="130" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="137" value="" style="edgeStyle=none;html=1;endArrow=none;endFill=0;" edge="1" parent="1" source="103" target="136">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="103" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="789.38" y="860" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="104" value="" style="endArrow=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="96" target="103">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="930" y="970" as="sourcePoint" />
|
||||||
|
<mxPoint x="1020" y="890" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="105" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="106" target="101">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1320" y="730" as="sourcePoint" />
|
||||||
|
<mxPoint x="1320" y="80" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="193" value="" style="edgeStyle=none;html=1;endArrow=none;endFill=0;dashed=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="106" target="194">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1720" y="930" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="106" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1710" y="860" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="107" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;jumpStyle=arc;" edge="1" parent="1" source="103" target="106">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="990" y="750" as="sourcePoint" />
|
||||||
|
<mxPoint x="1380" y="750" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="108" value="Создаем запись с токеном доступа Sanctum.<br>Их надо указывать если делается запрос к api.<br>Если запрос делается с фронта (через fetch, например), <br>токен подставится в заголовки автоматически на бэке" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="107">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-349" y="-32" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="114" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;endFill=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jumpStyle=arc;" edge="1" parent="1" source="31" target="113">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="440" y="1040" as="sourcePoint" />
|
||||||
|
<mxPoint x="1122" y="920" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="115" value="Кладем в сессию параметр _<b><font style="font-size: 13px;">auth_prev_page</font></b> со значением URL, <br>на который&nbsp;<span style="color: rgb(0, 0, 0);">перекинем пользователя&nbsp;</span>после аутентификации&nbsp;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="114">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-259" y="-22" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="220" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="117" target="132">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="717" y="1320" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="117" value="views\menu" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="600" y="1247" width="120" height="34.5" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="120" value="адрес страницы <br>есть?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="728.13" y="1115" width="142.5" height="70" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="121" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1150" y="1130" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="122" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="134" target="121">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1170" y="900" as="sourcePoint" />
|
||||||
|
<mxPoint x="1170" y="660" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="123" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;jumpStyle=arc;startArrow=classic;startFill=1;" edge="1" parent="1" source="120" target="121">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="990" y="750" as="sourcePoint" />
|
||||||
|
<mxPoint x="1380" y="750" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="124" value="Запрашиваем url страницы <br>откуда пришел пользователь<br><b><font style="font-size: 13px;">auth_prev_page</font></b>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;textShadow=0;" vertex="1" connectable="0" parent="123">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-49" y="-37" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="126" value="Нет" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="688.75" y="1115" width="40" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="128" value="" style="endArrow=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="130" target="120">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="918.62" y="1238" as="sourcePoint" />
|
||||||
|
<mxPoint x="921" y="1190" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="133" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="130" target="132">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="801" y="1337" />
|
||||||
|
<mxPoint x="725" y="1337" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="130" value="views\{url}" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="740" y="1246.5" width="121.25" height="33.5" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="131" value="Редирект на url откуда <br>пришел пользователь" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="860" y="1243.25" width="150" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="132" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="700" y="1390" width="50" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="134" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1150" y="940" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="136" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="790" y="940" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="138" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;jumpStyle=arc;startArrow=none;startFill=0;" edge="1" parent="1" source="136" target="134">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1051" y="1094" as="sourcePoint" />
|
||||||
|
<mxPoint x="1160" y="1094" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="139" value="Кладем в сессию <br>параметр <font style="font-size: 13px;"><b>is_admin</b></font>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=light-dark(#FFFFFF,#EDEDED);" vertex="1" connectable="0" parent="138">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-84" y="-22" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="142" value="id &lt;=&gt; tokenable_id" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1530" y="125" width="140" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="143" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.625;entryY=0;entryDx=0;entryDy=0;endArrow=none;endFill=0;dashed=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="101" target="142">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1560" y="63" as="sourcePoint" />
|
||||||
|
<mxPoint x="1571" y="165" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="145" value="Cookie" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1300" y="10" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="147" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="148" target="156">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1270" y="330" as="sourcePoint" />
|
||||||
|
<mxPoint x="1130" y="80" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="148" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1350" y="1030" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="236" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="150" target="120">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="150" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="789.38" y="1030" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="152" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;jumpStyle=arc;startArrow=none;startFill=0;" edge="1" parent="1" source="150" target="148">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="990" y="970" as="sourcePoint" />
|
||||||
|
<mxPoint x="1160" y="970" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="153" value="Кладем в куки <b><font style="font-size: 13px;">sanctum_token</font></b><br>для автоматической подстановки его в заголовки <br>при api запросах с фронта" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=light-dark(#FFFFFF,#EDEDED);" vertex="1" connectable="0" parent="152">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-159" y="-37" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="155" value="запрос содержит api/ &amp;&amp; <br>в куках есть sanctum_token&nbsp;" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="85" y="752.5" width="230" height="105" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="156" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1350" y="785" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="159" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="145" target="156">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1420" y="350" as="sourcePoint" />
|
||||||
|
<mxPoint x="1380" y="660" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="160" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jumpStyle=arc;exitX=1;exitY=0.5;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="155" target="156">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="950" y="690" as="sourcePoint" />
|
||||||
|
<mxPoint x="1590" y="750" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="163" value="Заголовки запроса" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-70" y="10" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="164" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="165" target="163">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="80" y="340" as="sourcePoint" />
|
||||||
|
<mxPoint x="255" y="80" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="180" value="" style="edgeStyle=none;html=1;dashed=1;endArrow=none;endFill=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="165" target="181">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="80" y="850" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="165" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-19" y="796" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="178" value="" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="166" target="182">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="245" y="910" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="166" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="190" y="920" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="167" value="Стандартная <br>аутентификация <br>Sanctum" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="200" y="900" width="120" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="168" value="" style="endArrow=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="166" target="155">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="90" y="720" as="sourcePoint" />
|
||||||
|
<mxPoint x="140" y="470" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="170" value="" style="endArrow=classic;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.25;entryDx=0;entryDy=0;jumpStyle=arc;" edge="1" parent="1" source="155" target="165">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="415" y="750" as="sourcePoint" />
|
||||||
|
<mxPoint x="40" y="680" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="171" value="Добавляем в заголовки <br>запроса sanctum_token, <br>без него аутентификация <br>Sanctum не пройдет" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="170">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-138" y="12" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="172" value="Да" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="35" y="780" width="40" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="173" value="Нет" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="200" y="850" width="40" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="174" value="" style="endArrow=classic;html=1;edgeStyle=orthogonalEdgeStyle;entryX=0.5;entryY=0;entryDx=0;entryDy=0;jumpStyle=arc;exitX=1;exitY=0.75;exitDx=0;exitDy=0;" edge="1" parent="1" source="165" target="166">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="90" y="740" as="sourcePoint" />
|
||||||
|
<mxPoint x="80" y="740" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="1" y="827" />
|
||||||
|
<mxPoint x="30" y="827" />
|
||||||
|
<mxPoint x="30" y="900" />
|
||||||
|
<mxPoint x="200" y="900" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="181" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-20" y="1030" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="182" value="В заголовках есть <br>sanctum_token?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="100" y="1015" width="200" height="70" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="185" value="" style="edgeStyle=none;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="182" target="181">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="255" y="860" as="sourcePoint" />
|
||||||
|
<mxPoint x="255" y="920" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="186" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="182" target="188">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="235" y="1040" as="sourcePoint" />
|
||||||
|
<mxPoint x="235" y="1100" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="200" y="1120" />
|
||||||
|
<mxPoint x="85" y="1120" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="187" value="Нет" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="147.5" y="1085" width="40" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="188" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="60" y="1390" width="50" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="189" value="response <br>с 401 ошибкой" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="35" y="1440" width="100" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="190" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="182" target="196">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="255" y="990" as="sourcePoint" />
|
||||||
|
<mxPoint x="300" y="1250" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="355" y="1050" />
|
||||||
|
<mxPoint x="355" y="1130" />
|
||||||
|
<mxPoint x="200" y="1130" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="191" value="Да" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="290" y="1055" width="40" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="208" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="194" target="206">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1720" y="1290" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="1720" y="1280" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="194" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1710" y="1190.25" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="198" value="" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="196" target="194">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1200" y="1230" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="196" value="" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="165" y="1179" width="70" height="62.5" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="199" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="196" target="188">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="255" y="990" as="sourcePoint" />
|
||||||
|
<mxPoint x="75" y="1100" as="targetPoint" />
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="85" y="1210" />
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="200" value="Нет" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="135" y="1179" width="40" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="206" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1510" y="1260" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="209" value="Если токен найден, запрашиваем <br>id юзера по tokenable_id" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1530" y="1290" width="210" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="211" value="<span style="color: rgb(0, 0, 0); text-wrap-mode: wrap;">В таблице с токенами есть</span><br style="text-wrap-mode: wrap;"><span style="color: rgb(0, 0, 0); text-wrap-mode: wrap;">запись с токеном из&nbsp;</span><span style="color: rgb(0, 0, 0); text-wrap-mode: wrap;">заголовка, <br>а также в таблице users <br>есть связанная запись <br>(пользователя) к этому токену ?</span>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="190" y="1275" width="200" height="90" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="212" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endFill=1;" edge="1" parent="1" target="214" source="196">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="152.5" y="1110" as="sourcePoint" />
|
||||||
|
<mxPoint x="-82.5" y="760" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="213" value="Аутентификация <br>успешна" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="212">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint y="135" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="214" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="175" y="1390" width="50" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="215" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endFill=1;" edge="1" parent="1" target="217" source="77">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="350" y="437" as="sourcePoint" />
|
||||||
|
<mxPoint x="22.5" y="-35" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="216" value="Редирект на страницу <br>аутентификации" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="215">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-18" y="-92" as="offset" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="217" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="285" y="665" width="50" height="50" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="218" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;edgeStyle=orthogonalEdgeStyle;endFill=1;" edge="1" parent="1" source="120" target="117">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="930" y="1030" as="sourcePoint" />
|
||||||
|
<mxPoint x="930" y="990" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="221" value="Редирект на вьюху <br>с меню Magic" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="485" y="1240" width="130" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="228" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="222" target="66">
|
||||||
|
<mxGeometry relative="1" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="222" value="Запрос" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;fillColor=#e1d5e7;strokeColor=#9673a6;strokeWidth=3;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-215" y="-30" width="30" height="60" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="237" value="Да" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="810" y="1179" width="40" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="238" value="" style="endArrow=none;dashed=1;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="60" target="113">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1160" y="315" as="sourcePoint" />
|
||||||
|
<mxPoint x="1160" y="610" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="113" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1150" y="440" width="20" height="40" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="239" value="" style="endArrow=none;dashed=1;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="52" target="134">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1170" y="440" as="sourcePoint" />
|
||||||
|
<mxPoint x="1170" y="620" as="targetPoint" />
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="28" value="В сесси есть&nbsp;<br>_auth_login" style="rhombus;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||||
|
<mxGeometry x="367.5" y="300" width="125" height="70" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="252" value="Да" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="195" y="1240" width="40" height="30" as="geometry" />
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
||||||
@@ -0,0 +1,701 @@
|
|||||||
|
<mxfile host="65bd71144e">
|
||||||
|
<diagram id="YrEqY51DlFa1ZGKHTR-x" name="Страница — 1">
|
||||||
|
<mxGraphModel dx="1474" dy="1569" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||||
|
<root>
|
||||||
|
<mxCell id="0"/>
|
||||||
|
<mxCell id="1" parent="0"/>
|
||||||
|
<mxCell id="685" value="Middleware\<br>AuthetnticateMagic" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="370" y="10" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="686" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="687" target="685">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="430" y="170" as="sourcePoint"/>
|
||||||
|
<mxPoint x="205" y="70" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="687" value="Сессия <br>стартована" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="375" y="200" width="110" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="688" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=#000000;fillColor=#d5e8d4;strokeWidth=1;" edge="1" parent="1" source="687" target="818">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="510" y="280" as="sourcePoint"/>
|
||||||
|
<mxPoint x="540" y="350" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="689" value="Да" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" vertex="1" connectable="0" parent="688">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="22" y="90" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="690" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fillColor=#fff2cc;strokeColor=#000000;strokeWidth=1;" edge="1" parent="1" source="687" target="721">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="250" y="360" as="sourcePoint"/>
|
||||||
|
<mxPoint x="320" y="350" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="691" value="Нет" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" vertex="1" connectable="0" parent="690">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="17" y="-77" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="692" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0;exitY=0.5;exitDx=0;exitDy=0;strokeColor=light-dark(#000000, #446e2c);fillColor=#d5e8d4;strokeWidth=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="818" target="694">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="460" y="590" as="sourcePoint"/>
|
||||||
|
<mxPoint x="420" y="520" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="693" value="Нет" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" vertex="1" connectable="0" parent="692">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-35" y="-27" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="694" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="347.5" y="460" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="695" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endFill=1;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1" source="694" target="721">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="440" y="1075" as="sourcePoint"/>
|
||||||
|
<mxPoint x="205" y="560" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="696" value="" style="endArrow=classic;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;exitDx=0;exitDy=0;fillColor=#fff2cc;strokeColor=#000000;strokeWidth=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;endFill=1;" edge="1" parent="1" source="818" target="822">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="665" y="580" as="sourcePoint"/>
|
||||||
|
<mxPoint x="520" y="510" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="697" value="Да" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" vertex="1" connectable="0" parent="696">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="12" y="-55" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="698" value="Controller\<br>LoginController" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="740" y="10" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="699" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1" source="721" target="701">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="505" y="550" as="sourcePoint"/>
|
||||||
|
<mxPoint x="840" y="560" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="370" y="550"/>
|
||||||
|
<mxPoint x="800" y="550"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="700" value="Проводим аутентификацию<br>&nbsp;через LDAP" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="699">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-129" y="-17" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="701" value="Аутентификация <br>LDAP успешна" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="728.75" y="560" width="142.5" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="702" value="" style="endArrow=none;html=1;edgeStyle=orthogonalEdgeStyle;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;strokeColor=light-dark(#000000, #446e2c);fillColor=#d5e8d4;strokeWidth=1;" edge="1" parent="1" source="701" target="705">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="880" y="660" as="sourcePoint"/>
|
||||||
|
<mxPoint x="918" y="720" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="703" value="Да" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" vertex="1" connectable="0" parent="702">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-28" y="-7" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="704" value="Session" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1100" y="10" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="705" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="789.38" y="665" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="706" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1150" y="665" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="707" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="705" target="706">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1000" y="674.5" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1170" y="674.5" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="708" value="Помещаем <b><font style="font-size: 13px;">_auth_login</font></b> и <br><b><font style="font-size: 13px;">_auth_groups</font></b>&nbsp;в сессию" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="707">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-83" y="-27" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="709" value="" style="endArrow=none;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="769" target="760">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="920" y="850" as="sourcePoint"/>
|
||||||
|
<mxPoint x="909" y="820" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="710" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1150" y="315" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="711" value="" style="endArrow=classic;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="710" target="818">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="990" y="760" as="sourcePoint"/>
|
||||||
|
<mxPoint x="550" y="380" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="712" value="web/api" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-240" y="95" width="80" height="80" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="713" value="Middleware\<br>AuthetnticateMagicApi" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="130" y="5" width="135" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="714" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="187.5" y="115" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="715" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="714" target="713">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="250" y="230" as="sourcePoint"/>
|
||||||
|
<mxPoint x="240" y="100" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="716" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;edgeStyle=orthogonalEdgeStyle;" edge="1" parent="1" source="712" target="714">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="110" y="120" as="sourcePoint"/>
|
||||||
|
<mxPoint x="90" y="200" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="717" value="api ендпоинт" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="716">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-156" y="-12" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="718" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;edgeStyle=orthogonalEdgeStyle;jumpStyle=arc;" edge="1" parent="1" source="712" target="687">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="130" y="160" as="sourcePoint"/>
|
||||||
|
<mxPoint x="420" y="190" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="719" value="web роут" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="718">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-317" y="-14" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="720" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="772" target="714">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="245" y="500" as="sourcePoint"/>
|
||||||
|
<mxPoint x="244.5" y="220" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="721" value="views\login" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="240" y="535" width="140" height="50" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="722" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="701" target="698">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="800" y="530" as="sourcePoint"/>
|
||||||
|
<mxPoint x="390" y="80" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="723" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="710" target="704">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="860" y="540" as="sourcePoint"/>
|
||||||
|
<mxPoint x="860" y="80" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="1160" y="220"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="724" value="" style="endArrow=none;dashed=1;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="816" target="706">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1170" y="385" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1150" y="510" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="725" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.375;entryY=0;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;endArrow=none;endFill=0;dashed=1;" edge="1" parent="1" source="726" target="763">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1560" y="40" as="sourcePoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="726" value="users" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1490" width="60" height="80" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="727" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="729" target="726">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1260" y="600" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1100" y="80" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="728" value="" style="edgeStyle=none;html=1;dashed=1;endArrow=none;endFill=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="729" target="805">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1537.2727272727275" y="930" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="729" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1510" y="745" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="730" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="790" y="745" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="731" value="" style="endArrow=none;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="730" target="705">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="930" y="850" as="sourcePoint"/>
|
||||||
|
<mxPoint x="930" y="660" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="732" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;jumpStyle=arc;" edge="1" parent="1" source="730" target="729">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="990" y="640" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1160" y="640" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="733" value="Создаем запись с логином пользователя в модели users, <br>если аутентификация проходит впервые<br>(нужно для работы Sanctum)" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=light-dark(#FFFFFF,#EDEDED);" vertex="1" connectable="0" parent="732">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-235" y="-27" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="734" value="personal_access_tokens" style="shape=cylinder3;whiteSpace=wrap;html=1;boundedLbl=1;backgroundOutline=1;size=15;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1640" y="5" width="160" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="735" value="модель с токенами <br>доступа Sanctum" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1655" y="-40" width="130" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="736" value="" style="edgeStyle=none;html=1;endArrow=none;endFill=0;" edge="1" parent="1" source="737" target="760">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="737" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="790.62" y="830" width="20" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="738" value="" style="endArrow=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="730" target="737">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="930" y="970" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1020" y="890" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="739" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="741" target="734">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1320" y="730" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1320" y="80" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="740" value="" style="edgeStyle=none;html=1;endArrow=none;endFill=0;dashed=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="741" target="800">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1720" y="930" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="741" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1710" y="830" width="20" height="65" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="742" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.25;entryDx=0;entryDy=0;exitX=1;exitY=0.25;exitDx=0;exitDy=0;jumpStyle=arc;" edge="1" parent="1" source="737" target="741">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="990" y="750" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1380" y="750" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="743" value="Создаем запись с токеном доступа Sanctum.<br>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="742">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-369" y="-19" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="744" value="" style="endArrow=classic;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;endFill=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jumpStyle=arc;" edge="1" parent="1" source="694" target="816">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="440" y="1040" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1122" y="920" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="745" value="Кладем в сессию параметр _<b><font style="font-size: 13px;">auth_prev_page</font></b> со значением URL, <br>на который&nbsp;<span style="color: rgb(0, 0, 0);">перекинем пользователя&nbsp;</span>после аутентификации&nbsp;" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="744">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-259" y="-22" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="746" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="747" target="758">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="717" y="1320" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="747" value="views\menu" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="600" y="1247" width="120" height="34.5" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="748" value="адрес страницы <br>есть?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="728.13" y="1115" width="142.5" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="749" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1150" y="1130" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="750" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="759" target="749">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1170" y="900" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1170" y="660" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="751" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;jumpStyle=arc;startArrow=classic;startFill=1;" edge="1" parent="1" source="748" target="749">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="990" y="750" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1380" y="750" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="752" value="Запрашиваем url страницы <br>откуда пришел пользователь<br><b><font style="font-size: 13px;">auth_prev_page</font></b>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=none;textShadow=0;" vertex="1" connectable="0" parent="751">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-49" y="-37" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="753" value="Нет" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="688.75" y="1115" width="40" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="754" value="" style="endArrow=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="756" target="748">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="918.62" y="1238" as="sourcePoint"/>
|
||||||
|
<mxPoint x="921" y="1190" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="755" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="756" target="758">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="801" y="1360"/>
|
||||||
|
<mxPoint x="725" y="1360"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="756" value="views\{url}" style="shape=parallelogram;perimeter=parallelogramPerimeter;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="740" y="1246.5" width="121.25" height="33.5" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="757" value="Редирект на url откуда <br>пришел пользователь" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="860" y="1243.25" width="150" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="758" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="700" y="1435" width="50" height="50" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="759" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1150" y="940" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="760" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="790" y="940" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="761" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;jumpStyle=arc;startArrow=none;startFill=0;" edge="1" parent="1" source="760" target="759">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1051" y="1094" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1160" y="1094" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="762" value="Кладем в сессию <br>параметр <font style="font-size: 13px;"><b>is_admin</b></font>" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=light-dark(#FFFFFF,#EDEDED);" vertex="1" connectable="0" parent="761">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-84" y="-22" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="763" value="id &lt;=&gt; tokenable_id" style="shape=hexagon;perimeter=hexagonPerimeter2;whiteSpace=wrap;html=1;fixedSize=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1530" y="125" width="140" height="50" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="764" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.625;entryY=0;entryDx=0;entryDy=0;endArrow=none;endFill=0;dashed=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;" edge="1" parent="1" source="734" target="763">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1560" y="63" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1571" y="165" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="765" value="Cookie" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1300" y="10" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="766" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="767" target="773">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1270" y="330" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1130" y="80" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="767" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1350" y="1030" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="768" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="769" target="748">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="769" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="789.38" y="1030" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="770" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;jumpStyle=arc;startArrow=none;startFill=0;" edge="1" parent="1" source="769" target="767">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="990" y="970" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1160" y="970" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="771" value="Кладем в куки <b><font style="font-size: 13px;">sanctum_token</font></b><br>для автоматической подстановки его в заголовки <br>при api запросах с фронта" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];labelBackgroundColor=light-dark(#FFFFFF,#EDEDED);" vertex="1" connectable="0" parent="770">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-159" y="-37" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="772" value="URL запроса содержит api/ &amp;&amp; <br>в куках есть sanctum_token&nbsp;" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="85" y="752.5" width="230" height="105" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="773" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1350" y="785" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="774" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="765" target="773">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1420" y="350" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1380" y="660" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="775" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;jumpStyle=arc;exitX=1;exitY=0.5;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="772" target="773">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="950" y="690" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1590" y="750" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="776" value="Заголовки запроса" style="rounded=1;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-70" y="10" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="777" value="" style="endArrow=none;dashed=1;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0.5;exitY=0;exitDx=0;exitDy=0;" edge="1" parent="1" source="779" target="776">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="80" y="340" as="sourcePoint"/>
|
||||||
|
<mxPoint x="255" y="80" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="778" value="" style="edgeStyle=none;html=1;dashed=1;endArrow=none;endFill=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="779" target="789">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="80" y="850" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="779" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-19" y="796" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="780" value="" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="781" target="790">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="245" y="910" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="781" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="190" y="890" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="782" value="Стандартная <br>аутентификация <br>Sanctum" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="207.5" y="870" width="120" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="783" value="" style="endArrow=none;html=1;exitX=0.5;exitY=0;exitDx=0;exitDy=0;entryX=0.5;entryY=1;entryDx=0;entryDy=0;" edge="1" parent="1" source="781" target="772">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="90" y="720" as="sourcePoint"/>
|
||||||
|
<mxPoint x="140" y="470" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="784" value="" style="endArrow=classic;html=1;exitX=0;exitY=0.5;exitDx=0;exitDy=0;entryX=1;entryY=0.25;entryDx=0;entryDy=0;jumpStyle=arc;" edge="1" parent="1" source="772" target="779">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="415" y="750" as="sourcePoint"/>
|
||||||
|
<mxPoint x="40" y="680" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="785" value="Добавляем в заголовки <br>запроса sanctum_token, <br>без него аутентификация <br>Sanctum не пройдет" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="784">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-138" y="12" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="786" value="Да" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="35" y="780" width="40" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="787" value="Нет" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="200" y="850" width="40" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="788" value="" style="endArrow=classic;html=1;edgeStyle=orthogonalEdgeStyle;entryX=0.5;entryY=0;entryDx=0;entryDy=0;jumpStyle=arc;exitX=1;exitY=0.75;exitDx=0;exitDy=0;" edge="1" parent="1" source="779" target="781">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="90" y="740" as="sourcePoint"/>
|
||||||
|
<mxPoint x="80" y="740" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="1" y="827"/>
|
||||||
|
<mxPoint x="30" y="827"/>
|
||||||
|
<mxPoint x="30" y="870"/>
|
||||||
|
<mxPoint x="200" y="870"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="789" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-19" y="975" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="790" value="В заголовках есть <br>Authorization токен sanctum?" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="100" y="960" width="200" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="791" value="" style="edgeStyle=none;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="790" target="789">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="255" y="860" as="sourcePoint"/>
|
||||||
|
<mxPoint x="255" y="920" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="792" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1" source="790" target="794">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="235" y="1040" as="sourcePoint"/>
|
||||||
|
<mxPoint x="235" y="1100" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="200" y="1050"/>
|
||||||
|
<mxPoint x="85" y="1050"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="793" value="Нет" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="130" y="1025" width="40" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="794" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#f8cecc;strokeColor=#b85450;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="60" y="1440" width="50" height="50" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="795" value="response <br>с 401 ошибкой" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="30" y="1490" width="100" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="796" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="790" target="802">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="255" y="990" as="sourcePoint"/>
|
||||||
|
<mxPoint x="300" y="1250" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="355" y="995"/>
|
||||||
|
<mxPoint x="355" y="1060"/>
|
||||||
|
<mxPoint x="200" y="1060"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="797" value="Да" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="300" y="970" width="40" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="798" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="800" target="805">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1720" y="1290" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="1760" y="1210"/>
|
||||||
|
<mxPoint x="1760" y="1280"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="799" value="" style="rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=none;endFill=0;dashed=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="800" target="827">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1721" y="1400" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="800" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1710" y="1190.25" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="801" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;startArrow=classic;startFill=1;" edge="1" parent="1" source="802" target="800">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1200" y="1230" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="510" y="1114"/>
|
||||||
|
<mxPoint x="510" y="1210"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="802" value="" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="165" y="1082.5" width="70" height="62.5" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="803" value="" style="edgeStyle=orthogonalEdgeStyle;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="802" target="794">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="255" y="990" as="sourcePoint"/>
|
||||||
|
<mxPoint x="75" y="1100" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="85" y="1114"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="804" value="Нет" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="130" y="1082.5" width="40" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="805" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1510" y="1260" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="806" value="Если токен найден, запрашиваем <br>id юзера по tokenable_id" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1530" y="1243.25" width="210" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="807" value="<span style="color: rgb(0, 0, 0); text-wrap-mode: wrap;">В таблице с токенами есть</span><br style="text-wrap-mode: wrap;"><span style="color: rgb(0, 0, 0); text-wrap-mode: wrap;">запись с токеном из&nbsp;</span><span style="color: rgb(0, 0, 0); text-wrap-mode: wrap;">заголовка, <br>а также в таблице users <br>есть связанная запись <br>(пользователя) к этому токену ?</span>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="210" y="1130" width="200" height="90" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="808" value="" style="endArrow=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endFill=0;" edge="1" parent="1" source="802" target="829">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="152.5" y="1110" as="sourcePoint"/>
|
||||||
|
<mxPoint x="-82.5" y="760" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="809" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="175" y="1440" width="50" height="50" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="810" value="" style="endArrow=classic;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;edgeStyle=orthogonalEdgeStyle;endFill=1;" edge="1" parent="1" source="748" target="747">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="930" y="1030" as="sourcePoint"/>
|
||||||
|
<mxPoint x="930" y="990" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="811" value="Редирект на вьюху <br>с меню Magic" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="485" y="1240" width="130" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="812" value="" style="edgeStyle=none;html=1;" edge="1" parent="1" source="813" target="712">
|
||||||
|
<mxGeometry relative="1" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="813" value="Запрос" style="shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top;html=1;outlineConnect=0;fillColor=#e1d5e7;strokeColor=#9673a6;strokeWidth=3;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="-215" y="-30" width="30" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="814" value="Да" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="810" y="1179" width="40" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="815" value="" style="endArrow=none;dashed=1;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="710" target="816">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1160" y="315" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1160" y="610" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="816" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1150" y="460" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="817" value="" style="endArrow=none;dashed=1;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="706" target="759">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="1170" y="440" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1170" y="620" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="818" value="В сесси есть&nbsp;<br>_auth_login" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="367.5" y="300" width="125" height="70" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="819" value="Да" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="150" y="1140" width="40" height="30" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="820" value="" style="endArrow=classicThin;html=1;edgeStyle=orthogonalEdgeStyle;fillColor=#fff2cc;strokeColor=light-dark(#000000, #6d5100);strokeWidth=1;endFill=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="701" target="721">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="710" y="690" as="sourcePoint"/>
|
||||||
|
<mxPoint x="370" y="610" as="targetPoint"/>
|
||||||
|
<Array as="points">
|
||||||
|
<mxPoint x="729" y="630"/>
|
||||||
|
<mxPoint x="310" y="630"/>
|
||||||
|
</Array>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="821" value="Нет" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];fontSize=13;" vertex="1" connectable="0" parent="820">
|
||||||
|
<mxGeometry x="-0.3625" y="8" relative="1" as="geometry">
|
||||||
|
<mxPoint x="104" y="-28" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="822" value="" style="ellipse;whiteSpace=wrap;html=1;aspect=fixed;fillColor=#d5e8d4;strokeColor=#82b366;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="405" y="390" width="50" height="50" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="823" value="Посредник пропускает <br>запрос дальше" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="450" y="390" width="150" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="824" value="Аутентификация <br>успешна" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="1">
|
||||||
|
<mxGeometry x="725" y="1505" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="825" value="" style="endArrow=classic;html=1;entryX=0;entryY=0.75;entryDx=0;entryDy=0;exitX=0.969;exitY=0.671;exitDx=0;exitDy=0;jumpStyle=arc;exitPerimeter=0;" edge="1" parent="1" source="737" target="741">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="820.6199999999999" y="857.5" as="sourcePoint"/>
|
||||||
|
<mxPoint x="1720" y="860" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="826" value="Записываем в поле abilities <br>permsissions пользователя для авторизации" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="825">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="-368" y="15" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="827" value="" style="rounded=0;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="1710" y="1359.25" width="20" height="40" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="828" value="" style="edgeStyle=none;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;endArrow=classic;endFill=1;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="829" target="827">
|
||||||
|
<mxGeometry relative="1" as="geometry">
|
||||||
|
<mxPoint x="1670" y="1390" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="829" value="" style="rhombus;whiteSpace=wrap;html=1;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="170" y="1350" width="60" height="58.5" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="830" value="" style="endArrow=classic;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;endFill=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="829" target="809">
|
||||||
|
<mxGeometry width="50" height="50" relative="1" as="geometry">
|
||||||
|
<mxPoint x="210" y="1155" as="sourcePoint"/>
|
||||||
|
<mxPoint x="200" y="1450" as="targetPoint"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="831" value="Аутентификация <br>успешна" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="830">
|
||||||
|
<mxGeometry x="0.1298" y="-2" relative="1" as="geometry">
|
||||||
|
<mxPoint x="2" y="92" as="offset"/>
|
||||||
|
</mxGeometry>
|
||||||
|
</mxCell>
|
||||||
|
<mxCell id="832" value="Проверяем срок жизни <br>sanctum токена.<br>Если остается менее часа,<br>продлеваем на 2 часа<br>" style="text;html=1;align=center;verticalAlign=middle;resizable=0;points=[];autosize=1;strokeColor=none;fillColor=none;" vertex="1" parent="1">
|
||||||
|
<mxGeometry x="210" y="1310" width="170" height="60" as="geometry"/>
|
||||||
|
</mxCell>
|
||||||
|
</root>
|
||||||
|
</mxGraphModel>
|
||||||
|
</diagram>
|
||||||
|
</mxfile>
|
||||||
+41
-6
@@ -1,20 +1,55 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Foundation\Application;
|
use Illuminate\Contracts\Http\Kernel;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
define('LARAVEL_START', microtime(true));
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
// Determine if the application is in maintenance mode...
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Check If The Application Is Under Maintenance
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| If the application is in maintenance / demo mode via the "down" command
|
||||||
|
| we will load this file so that any pre-rendered content can be shown
|
||||||
|
| instead of starting the framework, which could cause an exception.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
|
if (file_exists($maintenance = __DIR__.'/../storage/framework/maintenance.php')) {
|
||||||
require $maintenance;
|
require $maintenance;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register the Composer autoloader...
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Register The Auto Loader
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Composer provides a convenient, automatically generated class loader for
|
||||||
|
| this application. We just need to utilize it! We'll simply require it
|
||||||
|
| into the script here so we don't need to manually load our classes.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
require __DIR__.'/../vendor/autoload.php';
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
// Bootstrap Laravel and handle the request...
|
/*
|
||||||
/** @var Application $app */
|
|--------------------------------------------------------------------------
|
||||||
|
| Run The Application
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Once we have the application, we can handle the incoming request using
|
||||||
|
| the application's HTTP kernel. Then, we will send the response back
|
||||||
|
| to this client's browser, allowing them to enjoy our application.
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
$app = require_once __DIR__.'/../bootstrap/app.php';
|
$app = require_once __DIR__.'/../bootstrap/app.php';
|
||||||
|
|
||||||
$app->handleRequest(Request::capture());
|
$kernel = $app->make(Kernel::class);
|
||||||
|
|
||||||
|
$response = $kernel->handle(
|
||||||
|
$request = Request::capture()
|
||||||
|
)->send();
|
||||||
|
|
||||||
|
$kernel->terminate($request, $response);
|
||||||
|
|||||||
+48249
File diff suppressed because it is too large
Load Diff
Vendored
+30
@@ -1,4 +1,34 @@
|
|||||||
|
import 'bootstrap';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* We'll load the axios HTTP library which allows us to easily issue requests
|
||||||
|
* to our Laravel back-end. This library automatically handles sending the
|
||||||
|
* CSRF token as a header based on the value of the "XSRF" token cookie.
|
||||||
|
*/
|
||||||
|
|
||||||
import axios from 'axios';
|
import axios from 'axios';
|
||||||
window.axios = axios;
|
window.axios = axios;
|
||||||
|
|
||||||
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Echo exposes an expressive API for subscribing to channels and listening
|
||||||
|
* for events that are broadcast by Laravel. Echo and event broadcasting
|
||||||
|
* allows your team to easily build robust real-time web applications.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// import Echo from 'laravel-echo';
|
||||||
|
|
||||||
|
// import Pusher from 'pusher-js';
|
||||||
|
// window.Pusher = Pusher;
|
||||||
|
|
||||||
|
// window.Echo = new Echo({
|
||||||
|
// broadcaster: 'pusher',
|
||||||
|
// key: import.meta.env.VITE_PUSHER_APP_KEY,
|
||||||
|
// cluster: import.meta.env.VITE_PUSHER_APP_CLUSTER ?? 'mt1',
|
||||||
|
// wsHost: import.meta.env.VITE_PUSHER_HOST ?? `ws-${import.meta.env.VITE_PUSHER_APP_CLUSTER}.pusher.com`,
|
||||||
|
// wsPort: import.meta.env.VITE_PUSHER_PORT ?? 80,
|
||||||
|
// wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443,
|
||||||
|
// forceTLS: (import.meta.env.VITE_PUSHER_SCHEME ?? 'https') === 'https',
|
||||||
|
// enabledTransports: ['ws', 'wss'],
|
||||||
|
// });
|
||||||
|
|||||||
@@ -1,34 +0,0 @@
|
|||||||
import React from "react";
|
|
||||||
import { useEffect, useState } from "react";
|
|
||||||
import { getCsrfToken } from './../services/getCsrfService';
|
|
||||||
|
|
||||||
function MagicLogin ()
|
|
||||||
{
|
|
||||||
//Состояние с введенным логином
|
|
||||||
const [userLogin, setUserLogin] = useState<string>('');
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div id="login-container">
|
|
||||||
<div id="login-container__magic-name">Magic</div>
|
|
||||||
<div id="login-container__form">
|
|
||||||
<form action="login" method="POST" autoComplete="on">
|
|
||||||
<input
|
|
||||||
type="hidden"
|
|
||||||
name="_token"
|
|
||||||
value={getCsrfToken()}
|
|
||||||
/>
|
|
||||||
<input name="_auth_login" type="text" onChange={ (e) => setUserLogin(e.target.value) } placeholder="Логин" required/>
|
|
||||||
<input name="_auth_password" type="password" placeholder="Пароль" required/>
|
|
||||||
<button type="submit" onClick={ () => {
|
|
||||||
//При сабмите кладем логин в локалсторадж для того, чтобы при вызове api ендпоинтов передавать его в заголовках
|
|
||||||
//гаврилов
|
|
||||||
//ТОЧНО ЛИ ЭТО НУЖНО? МОЖЕТ, ЛУЧШЕ ВСЕ API ЕНДПОИНТЫ ПЕРЕПИСАТ ПОД ВЫЗОВ WEB РОУТОВ?
|
|
||||||
localStorage.setItem('magic_auth_login', userLogin);
|
|
||||||
} }>Вход</button>
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default MagicLogin;
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { createRoot } from 'react-dom/client';
|
|
||||||
import MagicLogin from './components/MagicLogin.tsx';
|
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
const container = document.getElementById('root')!;
|
|
||||||
const root = createRoot(container);
|
|
||||||
root.render(<MagicLogin />);
|
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
/**
|
|
||||||
* Сервис для полуения csrt токена для размещения в формах
|
|
||||||
* @date 24.07.2025
|
|
||||||
* @author dgavrilov
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const getCsrfToken = ():string => {
|
|
||||||
const METATAG:HTMLElement|null = document.querySelector('meta[name="csrf-token"]');
|
|
||||||
|
|
||||||
if (!METATAG) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
const CSRFTOKEN:string|null = METATAG.getAttribute('content');
|
|
||||||
if (!CSRFTOKEN) {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
return CSRFTOKEN;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="ru">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Laravel + React</title>
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||||
|
<link rel="stylesheet" href="https://intranet.rencredit.ru/Departments/CS/technical_library/css/normalize-SP.css?v={{ rand(111111, 999999); }}" type="text/css">
|
||||||
|
<link rel="stylesheet" href="https://intranet.rencredit.ru/Departments/CS/technical_library/css/choices.min.css?v={{ rand(111111, 999999); }}" type="text/css">
|
||||||
|
<link rel="stylesheet" href="https://intranet.rencredit.ru/Departments/CS/technical_library/css/style.css?v={{ rand(111111, 999999); }}" type="text/css">
|
||||||
|
<link rel="stylesheet" href="https://intranet.rencredit.ru/Departments/CS/components/css/style.css?v={{ rand(111111, 999999); }}" type="text/css">
|
||||||
|
<link rel="stylesheet" href="./../css/general.css?v={{ rand(111111, 999999); }}" type="text/css">
|
||||||
|
<!-- Без команды ниже корректно не обрабатывается React скрипт -->
|
||||||
|
@viteReactRefresh
|
||||||
|
<!-- Общие React компоненты для всех страниц -->
|
||||||
|
@vite(['resources/js/main_script.tsx'])
|
||||||
|
<!-- Общие React компоненты для всех страниц -->
|
||||||
|
@vite(['resources/css/main_styles.css'])
|
||||||
|
@yield('app_styles')
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div id=page__header-block data-app_name="{{ $moduleName->getRuModuleName() }}"></div>
|
||||||
|
<div id=page__content-block>
|
||||||
|
@yield('app_content')
|
||||||
|
</div>
|
||||||
|
@yield('app_scripts')
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -1,20 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html lang="en">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
||||||
<title>Laravel + React</title>
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
|
||||||
<!-- Без команды ниже корректно не обрабатывается React скрипт -->
|
|
||||||
@viteReactRefresh
|
|
||||||
<!-- файл со стилями resources/css/magicLogin.css не создан, так как не успел приступить к доделке меню -->
|
|
||||||
@vite(['resources/css/magicLogin.css', 'resources/js/magicLogin.tsx'])
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
<div id="root"></div>
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Http\Request;
|
|
||||||
use \App\Http\Controllers;
|
|
||||||
use Illuminate\Support\Facades\Route;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| API Routes
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here is where you can register API routes for your application. These
|
|
||||||
| routes are loaded by the RouteServiceProvider and all of them will
|
|
||||||
| be assigned to the "api" middleware group. Make something great!
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
#Гаврилов
|
|
||||||
//РОУТ НИЖЕ НУЖЕН? НЕ ПОМНЮ ОТКУДА ОН ВЗЯЛСЯ. Пока оставляю, но надо разобраться для теста он или нужен на проде
|
|
||||||
Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
|
|
||||||
return $request->user();
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Получение пользовательской роли
|
|
||||||
*/
|
|
||||||
Route::get('user_role/{moduleName}', [Controllers\AuthorizationController::class, 'getUserRole'])->where('moduleName', '^[a-z0-9_]+$');
|
|
||||||
@@ -1,56 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
use Illuminate\Support\Facades\Route;
|
||||||
use \App\Http\Controllers;
|
|
||||||
use App\Http\Middleware\AuthenticateMagic;
|
|
||||||
|
|
||||||
/*
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
| Web Routes
|
|
||||||
|--------------------------------------------------------------------------
|
|
||||||
|
|
|
||||||
| Here is where you can register web routes for your application. These
|
|
||||||
| routes are loaded by the RouteServiceProvider and all of them will
|
|
||||||
| be assigned to the "web" middleware group. Make something great!
|
|
||||||
|
|
|
||||||
*/
|
|
||||||
|
|
||||||
#Гаврилов
|
|
||||||
//РЕДИРЕКТ НА СТРАНИЦУ ЛОГИН
|
|
||||||
Route::get('/', function () {
|
Route::get('/', function () {
|
||||||
return view('welcome');
|
return view('welcome');
|
||||||
});
|
});
|
||||||
//Роут вызова вьюхи аутентификации (без посредника аутентификации)
|
|
||||||
Route::get('/login', function () {
|
|
||||||
return view('magic_login');
|
|
||||||
})->withoutMiddleware([AuthenticateMagic::class])->name('magic_login');
|
|
||||||
Route::get('/logout', ([Controllers\LoginController::class, 'logout']))->name('magic_logout');
|
|
||||||
//Роут вызова процессе аутентификации (без посредника аутентификации)
|
|
||||||
Route::post('login', [Controllers\LoginController::class, 'ldapCheckUser'])->withoutMiddleware([AuthenticateMagic::class]);
|
|
||||||
|
|
||||||
//ГАВРИЛОВ. добавить without middleware AuthMagicApi?
|
|
||||||
//Фоновое обновление санктум токена, если api вернул 401 (санктум протух), а сессия еще "жива"
|
|
||||||
Route::get('/silent_token_refresh', [Controllers\LoginController::class, 'silentRefreshUserSanctumToken'])->withoutMiddleware([AuthenticateMagic::class]);
|
|
||||||
|
|
||||||
// Route::get('/role', [\App\Http\Controllers\TestController::class, 'getRoles'])->name('get_role');
|
|
||||||
//Route::get('/access', [\App\Http\Controllers\TestController::class, 'getAccess']);
|
|
||||||
|
|
||||||
// Route::controller(Controllers\TestController::class)->group(function ()
|
|
||||||
// {
|
|
||||||
// Route::get('/access/{id}', 'getAccess')->where(['id' => '[0-9]+'])->name('getAccessById');
|
|
||||||
// //Route::get('/access/{id}', 'getAccess')->where(['id' => '[0-9]+']);
|
|
||||||
// });
|
|
||||||
|
|
||||||
// Route::get('/testData/{int}/{char}', [Controllers\TestDataController::class, 'insertNewData'])->where(['int' => '[0-9]+', 'char' => '[a-z]+']);
|
|
||||||
|
|
||||||
// Route::get('/testParam/{id}', [\App\Http\Controllers\TestController::class, 'getParam'])->where(['id' => '[0-9]+']);
|
|
||||||
// Route::get('/redirect', [Controllers\TestController::class, 'redirect']);
|
|
||||||
// Route::post('/role', [\App\Http\Controllers\TestController::class, 'setRole']);
|
|
||||||
// Route::post('/role_del', [\App\Http\Controllers\TestController::class, 'delRole']);
|
|
||||||
|
|
||||||
// Route::get('/test_table', [Controllers\TestFormController::class, 'getForm']);
|
|
||||||
// Route::post('/test_table', [Controllers\TestFormController::class, 'setForm'])->name('test_set_form');
|
|
||||||
|
|
||||||
// Route::get('/access/{id?}', [Controllers\AccessListController::class, 'getAccess'])->where(['id' => '[0-9]+']);
|
|
||||||
// Route::delete('/access/{id}', [Controllers\AccessListController::class, 'delAccess'])->where(['id' => '[0-9]+'])->name('del_lk_tm_access');
|
|
||||||
// Route::post('/access', [Controllers\AccessListController::class, 'postAccess']);
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
*
|
*
|
||||||
!private/
|
|
||||||
!public/
|
!public/
|
||||||
!.gitignore
|
!.gitignore
|
||||||
|
|||||||
+24
-13
@@ -1,18 +1,29 @@
|
|||||||
import { defineConfig } from 'vite';
|
import { defineConfig } from 'vite';
|
||||||
import laravel from 'laravel-vite-plugin';
|
import laravel from 'laravel-vite-plugin';
|
||||||
import tailwindcss from '@tailwindcss/vite';
|
import react from '@vitejs/plugin-react'; // Подключите плагин React
|
||||||
|
import { globbySync } from 'globby'; //Пакет для универсального указания файлов разлиных модулей
|
||||||
|
|
||||||
|
// Ищем все JS/CS точки входа во всех модулях
|
||||||
|
const moduleEntries = globbySync([
|
||||||
|
'Modules/*/resources/js/app.{jsx,tsx}', // Все app.jsx и app.tsx в подпапках Modules
|
||||||
|
'Modules/*/resources/css/app.css', // Все app.css
|
||||||
|
]);
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
plugins: [
|
plugins: [
|
||||||
laravel({
|
laravel({
|
||||||
input: ['resources/css/app.css', 'resources/js/app.js'],
|
// Укажите входные точки
|
||||||
refresh: true,
|
input: [
|
||||||
}),
|
'resources/css/app.css',
|
||||||
tailwindcss(),
|
'resources/js/app.tsx',
|
||||||
],
|
//Благодаря переменной ниже, мы можем не указывать каждый входной jsx и css скрипты для каждого модуля
|
||||||
server: {
|
...moduleEntries,
|
||||||
watch: {
|
],
|
||||||
ignored: ['**/storage/framework/views/**'],
|
refresh: true,
|
||||||
},
|
}),
|
||||||
},
|
react(), // Подключаем плагин React
|
||||||
|
],
|
||||||
|
esbuild: {
|
||||||
|
loader: 'tsx', // Важно для обработки TypeScript
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user