2017 © Pedro Peláez
 

library oauth2-ebay

eBay OAuth 2.0 Client Provider for The PHP League OAuth2-Client

image

neilcrookes/oauth2-ebay

eBay OAuth 2.0 Client Provider for The PHP League OAuth2-Client

  • Thursday, July 26, 2018
  • by neilcrookes
  • Repository
  • 1 Watchers
  • 0 Stars
  • 184 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Ebay Provider for OAuth 2.0 Client

This package provides Ebay OAuth 2.0 support for the PHP League's OAuth 2.0 Client., (*1)

Installation

To install, use composer:, (*2)

composer require neilcrookes/oauth2-ebay

Usage

Usage is the same as The League's OAuth client, using NeilCrookes\OAuth2\Client\Provider\Ebay as the provider., (*3)

$provider = new \NeilCrookes\OAuth2\Client\Provider\Ebay([
    'clientId' => 'YOUR EBAY APP ID',
    'clientSecret' => 'YOUR EBAY CERTIFICATE ID',
    'redirectUri' => 'YOUR EBAY "RU" NAME',
    'sandbox' => true, //defaults to false, i.e. production
    'http_errors' => false, // Optional. Means Guzzle Exceptions aren't thrown on 4xx or 5xx responses from eBay, allowing you to detect and handle them yourself
], [
    'optionProvider' => new \League\OAuth2\Client\OptionProvider\HttpBasicAuthOptionProvider()
]);

$accessToken = $provider->getAccessToken('authorization_code', [
    'code' => $_GET['code']
]);

$ebayUser = $provider->getResourceOwner($accessToken);

echo $ebayUser->getId(); // eBay User's user id
echo $ebayUser->getEmail(); // eBay User's email address

The Versions

26/07 2018

dev-master

9999999-dev

eBay OAuth 2.0 Client Provider for The PHP League OAuth2-Client

  Sources   Download

MIT

The Requires

 

authentication authorization oauth sso oauth2 identity idp single sign on ebay ebay api