dept-eduk / passport-personal-access-token-endpoint
此软件包最新版本(3.0.0)没有提供许可信息。
3.0.0
2019-10-31 10:12 UTC
Requires (Dev)
- mockery/mockery: ^1.2
- orchestra/testbench: ^3.7
This package is not auto-updated.
Last update: 2024-09-28 08:10:01 UTC
README
此软件包提供了一个端点,该端点接受用户凭据并返回对应的用户(如果有效),并带有他们可以使用以通过 'auth:api' 中间件的访问令牌。
安装
composer require e3creative/passport-personal-access-token-endpoint
php artisan vendor:publish
路由。
此软件包向您的应用程序添加了一个路由。
- POST /api/v1/login 中间件:api 必须的头部
Authorization: Bearer [your client token] Accept: application/json Content-type: application/json
必须的数据
email/username: the email or username of the user who wants to log in password: the password of the user who wants to log in
返回:登录的用户,包含可用于通过 'auth:api' 中间件的 access_token。
配置
发布供应商文件后,以下配置将可供您使用
route_middleware_name
Description: the middleware that should be applied to your POST endpoint to
ensure that only authorized users are able to retrieve a token
Default: 'api'
route_prefix
Description: the route prefix for your POST endpoint
Default: 'api/v1'