2017 © Pedro Peláez
 

library oauth2-yelp

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

image

stevenmaguire/oauth2-yelp

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

  • Wednesday, May 17, 2017
  • by stevenmaguire
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1,372 Installations
  • PHP
  • 0 Dependents
  • 2 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 5 % Grown

The README.md

Yelp Provider for OAuth 2.0 Client

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads, (*1)

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

Installation

To install, use composer:, (*3)

composer require stevenmaguire/oauth2-yelp

Usage

Usage is the same as The League's OAuth client, using \Stevenmaguire\OAuth2\Client\Provider\Yelp as the provider., (*4)

Client Credentials Flow

$provider = new Stevenmaguire\OAuth2\Client\Provider\Yelp([
    'clientId'          => '{yelp-client-id}',
    'clientSecret'      => '{yelp-client-secret}'
]);

try {

    // Try to get an access token using the client credentials grant.
    $accessToken = $provider->getAccessToken('client_credentials');

} catch (\League\OAuth2\Client\Provider\Exception\IdentityProviderException $e) {

    // Failed to get the access token
    exit($e->getMessage());

}

For further usage of this package please refer to the core package documentation on "Client Credentials Grant"., (*5)

Due to the constraints of Yelp Fusion's OAuth2 implementation, this package currently only supports the Client Credentials Grant and as a result, if you engage with the package for other grant types a Stevenmaguire\OAuth2\Client\Provider\Exception\ProviderConfigurationException exception will be thrown., (*6)

Testing

bash $ ./vendor/bin/phpunit, (*7)

Contributing

Please see CONTRIBUTING for details., (*8)

Credits

License

The MIT License (MIT). Please see License File for more information., (*9)

The Versions

17/05 2017

dev-master

9999999-dev

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

  Sources   Download

MIT

The Requires

 

The Development Requires

authorization oauth client oauth2 authorisation yelp

17/05 2017

0.1.0

0.1.0.0

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

  Sources   Download

MIT

The Requires

 

The Development Requires

authorization oauth client oauth2 authorisation yelp