定制 rugaard/oauth2-netatmo 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

rugaard/oauth2-netatmo

最新稳定版本:1.0.1

Composer 安装命令:

composer require rugaard/oauth2-netatmo

包简介

Netatmo OAuth 2.0 Client Provider for The PHP League OAuth2-Client

README 文档

README

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

This package provides Netatmo OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

Installation

To install, use composer:

composer require rugaard/oauth2-netatmo

Usage

Usage is the same as The League's OAuth client, using \Rugaard\OAuth2\Client\Netatmo\Provider\Netatmo as the provider.

Initialize Provider

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

Generate Authorization URL

// Authorize with default scopes.
$url = $provider->getAuthorizationUrl();

// Authorize with other scopes.
$url = $provider->getAuthorizationUrl([
    'scope' => ['read_scope', 'write_scope']
]);

To see which scopes are available, please refer to the scopes section.

Generate and refresh tokens.

For further usage of this package please refer to the core package documentation on "Authorization Code Grant".

Netatmo scopes

Note: This provider will always request the read_thermostat scope during authorization. Without this scope, Netatmo does not provide a generic way to fetch information about the "resource owner".

List of available scopes

Weather Station

  • read_station

Thermostat

  • read_thermostat
  • write_thermostat

Home Coach

  • read_homecoach

Welcome

  • read_camera
  • write_camera
  • access_camera (requires app to have granted scope by Netatmo)

Presence

  • access_presence (requires app to have granted scope by Netatmo)

Smoke Alarm

  • read_smokedetector

Testing

$ ./vendor/bin/phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 106
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-01-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固