xgbnl / laravel-guard
Laravel守卫扩展包
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
Installs: 115
Dependents: 0
Suggesters: 0
Security: 0
Stars: 21
Watchers: 1
Forks: 0
Open Issues: 1
pkg:composer/xgbnl/laravel-guard
Requires
- ext-http: *
- ext-openssl: *
- ext-redis: *
This package is auto-updated.
Last update: 2024-11-14 05:04:11 UTC
README
Bearer Auth
环境要求:php8.1 、redis、ext-http、ext-redis、ext-openssl、pecl-http
引入包
composer require xgbnl/laravel-guard
发布配置文件
php artisan guard:install
简单使用
- 编辑
.env,配置redis
REDIS_HOST=redis REDIS_PASSWORD=123456 REDIS_PORT=6379
- 前端使用
记得请求头要这样写:
request.headers['Authorization'] = 'Bearer' + ' ' + getToken() // getToken()是你定义的获取token方法
LICENSE
基于 MIT 开源