Xero OAuth 1.0 客户端提供商,用于 PHP League OAuth1-Client

2.0 2018-04-29 19:10 UTC

This package is auto-updated.

Last update: 2024-09-20 13:22:27 UTC


README

Latest Stable Version Software License Build Status Coverage Status Scrutinizer Code Quality Total Downloads

本软件包为 PHP League 的 OAuth 1.0 Client 提供Xero OAuth 1.0 支持。

安装

安装时请使用 composer

composer require invoiced/oauth1-xero

使用方法

使用方法与 The League 的 OAuth 客户端相同,使用 Invoiced\OAuth1\Client\Server\Xero 作为提供商。

公共API

遵循 Xero 公共应用程序

$server = new Invoiced\OAuth1\Client\Server\Xero([
    'identifier'      => 'your-identifier',
    'secret'          => 'your-secret',
    'callback_uri'    => 'https://your-callback-uri/',
    'partner'         => false,
]);

私有API

遵循 Xero 私有应用程序

$server = new Invoiced\OAuth1\Client\Server\Xero([
    'identifier'      => 'your-identifier',
    'secret'          => 'your-secret',
    'callback_uri'    => 'https://your-callback-uri/',
    'rsa_private_key' => '/path/private.pem',
    'rsa_public_key'  => '/path/public.pem',
]);

合作伙伴API

遵循 Xero 合作伙伴应用程序

$server = new Invoiced\OAuth1\Client\Server\Xero([
    'identifier'      => 'your-identifier',
    'secret'          => 'your-secret',
    'callback_uri'    => 'https://your-callback-uri/',
    'rsa_private_key' => '/path/private.pem',
    'rsa_public_key'  => '/path/public.pem',
]);