nookery / laravel-security
基于Laravel的简单安全模块
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
dev-master
2020-03-24 09:11 UTC
Requires
- php: ^7.0
- bacon/bacon-qr-code: 1.0
- pragmarx/google2fa-laravel: ^1.0
This package is auto-updated.
Last update: 2021-03-09 01:44:13 UTC
README
About
基于Laravel的简单安全模块
Features
- IP信任与拦截
- Google 2fa两步验证
- 权限控制
- 记录操作日志
Install
composer require nookery/laravel-security
php artisan vendor:publish --provider="Nookery\Security\SecurityProvider"
php artisan migrate
Usage
在app/Http/Kernel.php文件中增加:
...... protected $routeMiddleware = [ ...... 'security' => \Nookery\Security\Security::class, ];
然后在路由定义文件中即可使用该中间件:
Route::group([ 'middleware' => ['auth', 'security'], ...... ], function () { ...... });
Pages
访问/security/admin以查看安全中心管理页面。
两步验证配置页面:
return view('security::app.index');
License
The Laravel framework is open-sourced software licensed under the MIT license.