aaronheath/oauth-client

用于我应用中的简单 OAuth2 客户端。

v1.0.0 2023-10-01 07:56 UTC

README

Build Status

简介

这是一个个人包,提供简单的 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 服务器。