rabianr / laravel-config-based-auth-basic
基于配置文件的 HTTP Basic Authentication 中间件,适用于 Laravel
1.1
2021-10-28 08:42 UTC
Requires
- php: >=7.2
- illuminate/contracts: ^6|^7|^8|^9
- illuminate/support: ^6|^7|^8|^9
- symfony/http-foundation: ^4|^5
- symfony/http-kernel: ^4|^5
Requires (Dev)
- laravel/framework: ^6|^7|^8
- phpunit/phpunit: ^6|^7|^8|^9
This package is auto-updated.
Last update: 2024-09-12 13:00:59 UTC
README
安装
composer require rabianr/laravel-config-based-auth-basic
配置
发布配置以将文件复制到您的个人配置
php artisan vendor:publish --tag="authbasic"
使用方法
将 auth.basic.cb 中间件设置到需要基本认证的任何路由。
在配置文件 config/authbasic.php 中定义凭证。
'credentials' => [ [ 'user', 'password' ], ],
或在 .env 文件中
AUTHBASIC_USERS=user1:pass1,user2:pass2