tuanha/auth-api-gateway
Composer 安装命令:
composer require tuanha/auth-api-gateway
包简介
A package login with service auth
README 文档
README
Sau khi tải package về. Cần thực hiện các bước sau để có thể sử dụng:
Cấu hình file env cho trùng với server Redis của Server Auth
VD:
-
BROADCAST_DRIVER=log -
CACHE_DRIVER=file -
QUEUE_CONNECTION=sync -
SESSION_DRIVER=redis -
SESSION_LIFETIME=1200 -
CACHE_PREFIX=LONGND -
REDIS_CLIENT=predis -
REDIS_HOST=127.0.0.1 -
REDIS_PASSWORD=null -
REDIS_PORT=6379
Sửa các file config cho phù hợp:
- Thêm vào providers trong file app.php :
ViralMS\AuthApiGateway\AuthApiGatewayServiceProvider::class, - Ẩn dòng trong file database:
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
Chạy publish vendor:
- chạy command:
php artisan vendor:publish --provider=ViralMS\AuthApiGateway\AuthApiGatewayServiceProvider
Thay thế middleware Auth trong file Kernel.php ở biến $routeMiddleware:
'auth' => \ViralMS\AuthApiGateway\AuthenticateRedis::class,'guest' => \ViralMS\AuthApiGateway\RedirectIfAuthenticatedRedis::class,
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-12-12