Please use another password protection tool for your websites
A Password Protection Middleware For Laravel Applications That Fits Your Brand.
DEMO: vault-423.ultrabold.de // PASSWORD: vault423
- 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)
composer require sebastianjung/laravel-vault-423
Add the following line to your $middlewareGroups
Array inside your Kernel.php
protected $middlewareGroups = [
'web' => [
...,
\SebastianJung\Vault423\Http\Middleware\Vault423::class
],
...
]
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.
Remember to add the ServiceProvider of this package to your $providers
array inside your app.php
config file.
SebastianJung\Vault423\Vault423ServiceProvider::class
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');
});
To publish the config file for this package simply execute
php artisan vendor:publish --provider='SebastianJung\Vault423\Vault423ServiceProvider'
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']
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.
You may need to call the package discovery of laravel again like so:
php artisan package:discover