softonic/oauth2-provider

Softonic OAuth2 提供商

1.3.1 2024-07-17 14:14 UTC

README

Latest Version Software License Build Status Total Downloads Average time to resolve an issue Percentage of issues still open

此软件包为 PHP League 的 OAuth 2.0 客户端 提供Softonic OAuth 2.0 支持。

安装

您可以使用 composer 安装此软件包的最新版本

composer require softonic/oauth2-provider

配置

<?php

$options = [
    'clientId' => 'myClient',
    'clientSecret' => 'mySecret'
];

$client = new Softonic\OAuth2\Client\Provider\Softonic($options);

$token = $client->getAccessToken('client_credentials', ['scope' => 'myscope']);

测试

softonic/oauth2-provider 包含一个 PHPUnit 测试套件,以及使用 PHP CS Fixer 的编码风格合规性测试套件。

要从项目文件夹中运行测试,请运行以下命令。

$ make tests

在开发环境中打开终端

$ make debug

许可证

Apache 2.0 许可证。有关更多信息,请参阅 LICENSE