This package provides Xero OAuth 1.0 support for the PHP League's OAuth 1.0 Client.
To install, use composer:
composer require invoiced/oauth1-xero
Usage is the same as The League's OAuth client, using Invoiced\OAuth1\Client\Server\Xero
as the provider.
Follows Xero Public Applications.
$server = new Invoiced\OAuth1\Client\Server\Xero([
'identifier' => 'your-identifier',
'secret' => 'your-secret',
'callback_uri' => 'https://your-callback-uri/',
'partner' => false,
]);
Follows Xero Private Applications.
$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',
]);
Follows Xero Partner Applications.
$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',
]);