aaronheath / oauth-client
用于我应用中的简单 OAuth2 客户端。
v1.0.0
2023-10-01 07:56 UTC
Requires
- php: ^8.2.0
- ext-json: *
- aaronheath/class-logger: ^1.2.0
- guzzlehttp/guzzle: ^7.8.0
- illuminate/support: ^10.0.0
Requires (Dev)
- mockery/mockery: ^1.5.0
- orchestra/testbench: ^8.0.0
- phpunit/phpunit: ~10.0
This package is auto-updated.
Last update: 2024-09-30 01:52:28 UTC
README
简介
这是一个个人包,提供简单的 OAuth2 客户端。客户端使用静态的 个人访问令牌。
安装
此包通过 Composer 安装。
安装之前,必须将存储库添加到宿主项目的 composer.json 文件的 repositories 部分中。
"repositories": [
{
"type": "vcs",
"url": "https://github.com/aaronheath/oauth-client"
}
],
要安装,请运行以下命令。
composer require aaronheath/oauth-client
然后,发布配置文件。将在 config/oauth-client.php 创建新文件。
php artisan vendor:publish
最后,至少需要通过更新项目的 .env 文件来配置默认 OAuth 服务器。
OAUTH_CLIENT_URL=https://example.com/oauth/token
OAUTH_CLIENT_ID=client_id
OAUTH_CLIENT_SECRET=client_secret
可以在配置文件中配置其他 OAuth 服务器。