mirror of
https://github.com/avecms/AVE.cms.git
synced 2026-08-01 08:45:44 +00:00
41 lines
1.4 KiB
PHP
41 lines
1.4 KiB
PHP
<?php
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------------------
|
|
| AVE.cms
|
|
|--------------------------------------------------------------------------------------
|
|
| @package AVE.cms
|
|
| @file adminx/modules/Auth/module.php
|
|
| @author AVE.cms <support@ave-cms.ru>
|
|
| @copyright 2007-2026 (c) AVE.cms
|
|
| @link https://ave-cms.ru
|
|
| @version 3.3
|
|
*/
|
|
|
|
defined('BASEPATH') || die('Direct access to this location is not allowed.');
|
|
|
|
/**
|
|
* Модуль доступа: экран логина на теме AdminKit + logout.
|
|
*
|
|
* Роут /login публичный (доступен без авторизации); /logout требует входа и
|
|
* работает через POST + CSRF (ajax-контракт success/error).
|
|
*/
|
|
return [
|
|
'code' => 'auth',
|
|
'name' => 'Доступ',
|
|
'version' => '0.1.0',
|
|
|
|
'public_routes' => [
|
|
'/login',
|
|
'/locale',
|
|
],
|
|
|
|
'routes' => array(
|
|
array('GET', '/login', array(\App\Adminx\Auth\Controller::class, 'form')),
|
|
array('POST', '/login', array(\App\Adminx\Auth\Controller::class, 'login')),
|
|
array('POST', '/locale', array(\App\Adminx\Auth\Controller::class, 'language')),
|
|
array('POST', '/reauth', array(\App\Adminx\Auth\Controller::class, 'reauth'), array('permission' => 'admin_panel')),
|
|
array('POST', '/logout', array(\App\Adminx\Auth\Controller::class, 'logout')),
|
|
),
|
|
];
|