tecbeast42 / basic-auth-middleware by tecbeast

A middleware for Laravel 5.1+ where you can use basic auth with any webserver. Dependend only one config file.
1,125
0
3
Package Data
Maintainer Username: tecbeast
Package Create Date: 2017-05-10
Package Last Update: 2017-06-04
Language: PHP
License: MIT
Last Refreshed: 2024-05-18 03:17:51
Package Statistics
Total Downloads: 1,125
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 3
Total Forks: 1
Total Open Issues: 0

BasicAuthWithEnv

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"