mdmahbubhelal / config-basic-auth
Provides basic auth using a config file for credentials
Installs: 14
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
pkg:composer/mdmahbubhelal/config-basic-auth
Requires (Dev)
- orchestra/testbench: ^7.0
- phpunit/phpunit: ^9.5
README
Useful mostly in staging scenarios where you don't want website publicly accessible by everyone.
Default credentials are:
username: user0
password: password0
username: user1
password: password1
Installation
composer require mdmahbubhelal/config-basic-auth --dev
Configuration
you can publish config by running:
php artisan vendor:publish --provider="MdMahbubHelal\ConfigBasicAuth\ConfigBasicAuthServiceProvider" --tag="config"
that will publish basicauth.php file in config directory
Basic auth can be disabled by adding BASICAUTH_ENABLED=false in .env
You can change the username and password in the users array:
'users' => [
[
'username' => 'user0',
'password' => 'password0',
],
[
'username' => 'user1',
'password' => 'password1',
]
],