2017 © Pedro Peláez
 

library guzzle-oauth2-middleware

Guzzle middleware with OAuth2 integration

image

softonic/guzzle-oauth2-middleware

Guzzle middleware with OAuth2 integration

  • Monday, August 21, 2017
  • by Joskfg
  • Repository
  • 7 Watchers
  • 0 Stars
  • 7,193 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 2 Open issues
  • 6 Versions
  • 63 % Grown

The README.md

Guzzle OAuth2 Middleware

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads Average time to resolve an issue Percentage of issues still open, (*1)

This package provides middleware for guzzle for handling OAuth2 token negotiation and renewal on expiry transparently. It accecpts PHP League's OAuth 2.0 Clients., (*2)

Installation

To install, use composer:, (*3)

composer require softonic/guzzle-oauth2-middleware

Usage

``` php <?php $options = [ 'clientId' => 'myclient', 'clientSecret' => 'mysecret' ];, (*4)

// Any provider extending League\OAuth2\Client\Provider\AbstractProvider will do $provider = new Softonic\OAuth2\Client\Provider\Softonic($options);, (*5)

// Send OAuth2 parameters and use token_options for any other parameters your OAuth2 provider needs $config = ['grant_type' => 'client_credentials', 'scope' => 'myscope', 'token_options' => ['audience' => 'test_audience']];, (*6)

// Any implementation of PSR-6 Cache will do $cache = new \Symfony\Component\Cache\Adapter\FilesystemAdapter();, (*7)

$client = \Softonic\OAuth2\Guzzle\Middleware\ClientBuilder::build( $provider, $config, $cache, ['base_uri' => 'https://foo.bar/'] ); $response = $client->request('POST', 'qux);, (*8)



Testing ------- `softonic/guzzle-oauth2-middleware` has a [PHPUnit](https://phpunit.de) test suite and a coding style compliance test suite using [PHP CS Fixer](http://cs.sensiolabs.org/). To run the tests, run the following command from the project folder. ``` bash $ docker-compose run test

To run interactively using PsySH: bash $ docker-compose run psysh, (*9)

License

The Apache 2.0 license. Please see LICENSE for more information., (*10)

The Versions

21/08 2017

dev-master

9999999-dev https://github.com/softonic/guzzle-oauth2-middleware

Guzzle middleware with OAuth2 integration

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

middleware oauth2 guzzle

21/08 2017

1.1.1

1.1.1.0 https://github.com/softonic/guzzle-oauth2-middleware

Guzzle middleware with OAuth2 integration

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

middleware oauth2 guzzle

21/08 2017

dev-bugfix/improve-readability

dev-bugfix/improve-readability https://github.com/softonic/guzzle-oauth2-middleware

Guzzle middleware with OAuth2 integration

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

middleware oauth2 guzzle

21/08 2017

1.1.0

1.1.0.0 https://github.com/softonic/guzzle-oauth2-middleware

Guzzle middleware with OAuth2 integration

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

middleware oauth2 guzzle

18/08 2017

dev-bugfix/fix-readme

dev-bugfix/fix-readme https://github.com/softonic/guzzle-oauth2-middleware

Guzzle middleware with OAuth2 integration

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

middleware oauth2 guzzle

18/08 2017

1.0.0

1.0.0.0 https://github.com/softonic/guzzle-oauth2-middleware

Guzzle middleware with OAuth2 integration

  Sources   Download

Apache-2.0

The Requires

 

The Development Requires

middleware oauth2 guzzle