drewhammond/oauth2-brivo
最新稳定版本:0.2.2
Composer 安装命令:
composer require drewhammond/oauth2-brivo
包简介
Brivo Provider for OAuth2 client
README 文档
README
This package provides Brivo OnAir OAuth 2.0 support for the PHP League's OAuth 2.0 Client.
Installation
To install, use composer:
$ composer require drewhammond/oauth2-brivo
Usage
The example below is taken from a Laravel project with the BRIVO_CLIENT_ID and BRIVO_CLIENT_SECRET defined in the project .env file.
$provider = new \Drewhammond\OAuth2\Client\Provider\Brivo([ 'clientId' => getenv('BRIVO_CLIENT_ID'), 'clientSecret' => getenv('BRIVO_CLIENT_SECRET'), ]); // Using the password grant type $accessToken = $provider->getAccessToken('password', [ 'username' => getenv('BRIVO_USERNAME'), 'password' => getenv('BRIVO_PASSWORD'), ]); // Do something with your access token... $token = $accessToken->getToken(); $expires = $accessToken->getExpires();
Support
Please open a new issue if you run into any problems.
License
MIT License
Copyright (c) 2018 Drew Hammond
统计信息
- 总下载量: 3.31k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-13