Xero OAuth 1.0 server implementation for PHP League's OAuth 1.0 Client
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
tests
.gitattributes
.gitignore
.php_cs.cache
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml.dist

README.md

Xero Provider for OAuth 1.0 Client

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

This package provides Xero OAuth 1.0 support for the PHP League's OAuth 1.0 Client.

Installation

To install, use composer:

composer require invoiced/oauth1-xero

Usage

Usage is the same as The League's OAuth client, using Invoiced\OAuth1\Client\Server\Xero as the provider.

Public API

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,
]);

Private API

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',
]);

Partner API

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',
]);