tecbeast / basic-auth-with-env
A middleware for Laravel 5.1+ where you can use basic auth with any webserver. Dependend only one config file.
Installs: 1 125
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: >=5.5.9
- laravel/framework: >=5.1.0
This package is auto-updated.
Last update: 2024-11-07 18:43:07 UTC
README
A middleware for Laravel 5.1+ where you can use basic auth with any webserver. Depending only on one config file.
Installation
composer require tecbeast/basic-auth-with-env
Add the service provider to the providers array in config/app.php:
'providers' => [
...
TecBeast\BasicAuthWithEnv\BasicAuthServiceProvider::class,
],
Add the middleware to the middleware array (for global, otherwise add to route or group (Laravel 5.2+)) in app/Http/Kernel.php:
protected $middleware = [
...
\TecBeast\BasicAuthWithEnv\Middleware\BasicAuth::class,
];
Publish the config to your application:
php artisan vendor:publish --provider="TecBeast\BasicAuthWithEnv\BasicAuthServiceProvider"