stevenmaguire/oauth2-nest

为 PHP League OAuth2-Client 提供的 Nest OAuth 2.0 客户端提供程序

2.0.0 2017-01-31 01:24 UTC

This package is auto-updated.

Last update: 2024-09-14 10:45:54 UTC


README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

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

安装

要安装,请使用 composer

composer require stevenmaguire/oauth2-nest

使用方法

使用方法与 The League 的 OAuth 客户端相同,使用 \Stevenmaguire\OAuth2\Client\Provider\Nest 作为提供程序。

授权码流

$provider = new Stevenmaguire\OAuth2\Client\Provider\Nest([
    'clientId'          => '{nest-client-id}',
    'clientSecret'      => '{nest-client-secret}',
    'redirectUri'       => 'https://example.com/callback-url'
]);

有关此包的进一步使用,请参阅 核心包文档中的“授权码授予”

资源拥有者信息

Nest 不支持访问授权资源拥有者的任何个人信息。因此,此包不支持核心包中记录的 getResourceOwner 方法。

如果您尝试使用此方法,此包将抛出 Stevenmaguire\OAuth2\Client\Provider\Exception\ResourceOwnerException 异常。

测试

$ ./vendor/bin/phpunit

贡献

有关详细信息,请参阅 CONTRIBUTING

鸣谢

许可证

MIT 许可证(MIT)。有关更多信息,请参阅 许可证文件