richardhj / oauth2-epost
此软件包的最新版本(v0.9.0)没有提供许可证信息。
E-POSTBUSINESS OAuth 2.0 客户端提供商,用于 The PHP League OAuth2-Client
v0.9.0
2016-10-12 17:35 UTC
Requires
- php: ^5.4 || ^7.0
- league/oauth2-client: ~1.4
This package is auto-updated.
Last update: 2024-09-10 20:35:18 UTC
README
此软件包为 PHP League 的 OAuth 2.0 客户端提供 E-POSTBUSINESS API OAuth 2.0 支持。
安装
通过 Composer
$ composer require richardhj/oauth2-epost
使用方法
此提供商支持 授权代码授予 以及 资源所有者密码凭据授予。在使用之前,请阅读这些使用说明: https://github.com/thephpleague/oauth2-client#usage 但您将使用此提供商而不是 GenericProvider
。
这是初始化提供商的方法
$provider = new EPost\OAuth2\Client\Provider\EPost( [ 'clientId' => sprintf('%s,%s', EPOST_DEV_ID, EPOST_APP_ID), 'redirectUri' => 'http://localhost:8080/oauth2_redirect.php', // Only necessary for the Authorization Code Grant flow 'scopes' => ['create_letter', 'send_hybrid'], 'lif' => EPOST_LIF_CONTENT, 'enableTestEnvironment' => true, ] );
许可证
GNU Lesser General Public License (LGPL)