sebastianjung/laravel-vault-423
Composer 安装命令:
composer require sebastianjung/laravel-vault-423
包简介
A Customizable Password Protection Middleware For Laravel Applications That Fits Your Brand.
README 文档
README
Please use another password protection tool for your websites
laravel-vault-423
A Password Protection Middleware For Laravel Applications That Fits Your Brand.
DEMO: vault-423.ultrabold.de // PASSWORD: vault423
Features
- multiple passwords (per .env file)
- automated revoke of access by simply removing the password from the password list
- IP whitelisting (saves time when clearing cookie cache often times ;P)
- fully customizable (Custom Logo, Font Family, Colors and more ...
- neat animations
- works in common browser (including our most beloved IE11)
CONTENTS
Installation
Composer
composer require sebastianjung/laravel-vault-423
Middleware
Add the following line to your $middlewareGroups Array inside your Kernel.php
protected $middlewareGroups = [
'web' => [
...,
\SebastianJung\Vault423\Http\Middleware\Vault423::class
],
...
]
Creating Passwords
Inside your .env file create a line as follows:
VAULT_423_PASSWORDS=password1,password2
If no password / string is provided the page is accessible to anyone.
Laravel < 5.5
Remember to add the ServiceProvider of this package to your $providers array inside your app.php config file.
SebastianJung\Vault423\Vault423ServiceProvider::class
Laravel < 5.2
Because there is no $middlewareGroups Array inside your Kernel.php you need to add a 'vault' key to the $routeMiddleware Array like so:
protected $routeMiddleware = [
...,
'vault' => \SebastianJung\Vault423\Http\Middleware\Vault423::class
]
After that you need to wrap the Routes you want to protect with the following:
Route::group('middleware' => ['vault']], function () {
Route::get('/', 'SiteController@index');
});
Configuration
To publish the config file for this package simply execute
php artisan vendor:publish --provider='SebastianJung\Vault423\Vault423ServiceProvider'
Whitelisting
Inside your config file there is an Array called whitelist. Just fill it with some IPs as strings like so:
'whitelist' => ['127.0.0.1', '192.168.0.1']
Customization
Available customizations are:
- meta title tag
- logo
- logo size
- welcome text
- link to some webpage
- colors
- font families
- and if that is not enough for you: a custom css option
Further information is available in the vault-423.php config file.
Troubleshooting
Call To Undefined Method isDeferred()
You may need to call the package discovery of laravel again like so:
php artisan package:discover
统计信息
- 总下载量: 213
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-01-04
