invoiced/oauth1-xero

为PHP League OAuth1-Client提供的Xero OAuth 1.0客户端提供者

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客户端提供了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',
]);