emartech / guzzle-escher-middleware
Escher authentication middleware for Guzzle Http Client
0.2.2
2018-12-13 16:33 UTC
Requires
- php: ^7.1
- emartech/escher: ^1.2
- guzzlehttp/guzzle: ^6.3
- psr/http-message: ^1.0
Requires (Dev)
- phpunit/phpunit: ^7.1
- squizlabs/php_codesniffer: ^3.2
This package is auto-updated.
Last update: 2024-12-08 01:22:36 UTC
README
Guzzle Escher Middleware
This authentication middleware add Escher sign functionality to Guzzle Http Client.
Installation
composer require emartech/guzzle-escher-middleware
Usage
<?php $credential = new \Guzzle\Http\Middleware\EscherCredential('key', 'secret', 'some/credential/scope'); $escherMiddleware = new \Guzzle\Http\Middleware\EscherMiddleware($credential); $stack = \GuzzleHttp\HandlerStack::create(); $stack->push($escherMiddleware); $client = new \GuzzleHttp\Client(['handler' => $stack]); // Important: set the auth option to escher to activate the middleware $response = $client->get('http://www.8points.de', ['auth' => 'escher']);