定制 dmt-software/oauth2-trustpilot 二次开发

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

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

dmt-software/oauth2-trustpilot

最新稳定版本:v1.0.1

Composer 安装命令:

composer require dmt-software/oauth2-trustpilot

包简介

A Trustpilot Client Provider for The PHP League OAuth2-Client

README 文档

README

Install

composer require dmt-software/oauth2-trustpilot

Usage

use DMT\OAuth2\Client\Provider\Trustpilot; use League\OAuth2\Client\Provider\Exception\IdentityProviderException; $provider = new Trustpilot([ 'clientId' => '{ your_client_id }', 'clientSecret' => '{ your_client_secret }', ]); try { $accessToken = $provider->getAccessToken( 'password', [ 'username' => '{ your_username }', 'password' => '{ your_password }' ] ); } catch (IdentityProviderException $exception) { if ($exception->getCode() === 401) { // token is expired } if ($exception->getCode() === 429) { // too many requests } }

see more examples on league/oauth2-client

Error handling

Unfortunately the response body in case of an error is not consistent. To better understand the reason a request is failed call the IdentityProviderException::getResponseBody method.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固