Download the PHP package complex-media/guzzle-hawk without Composer
On this page you can find all versions of the php package complex-media/guzzle-hawk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download complex-media/guzzle-hawk
More information about complex-media/guzzle-hawk
Files in complex-media/guzzle-hawk
Download complex-media/guzzle-hawk
More information about complex-media/guzzle-hawk
Files in complex-media/guzzle-hawk
Vendor complex-media
Package guzzle-hawk
Short Description A GuzzlePHP plugin for Hawk authentication
License MIT
Package guzzle-hawk
Short Description A GuzzlePHP plugin for Hawk authentication
License MIT
Please rate this library. Is it a good library?
Informations about the package guzzle-hawk
A Hawk Authenticator for Guzzle. 
Originally developed by jeskew, this extremely simple Plugin provides middleware you can place on your Guzzle client to automagically sign your requests.
Usage
First, install with Composer:
composer require complex-media/guzzle-hawk
Then, use it in code.
use ComplexMedia\Guzzle\Plugin\Hawk;
use GuzzleHttp\Client as Guzzle;
$client = new Guzzle();
$signer = new Hawk($key, $secret, $algorithm, $offset);
$client->getEmitter()->attach($signer);
$response = $client->get($URL);
$algorithm
will default to 'sha256'
, but you can set it to whatever your system supports.
$offset
adds a clock skew to synchronize with your server, and defaults to 0
. If you
get a 401 from your server, you can adjust several properties on the signer and try again
immediately:
$signer->key = $new_key
$signer->secret = $new_secret
$signer->algorithm = $new_algorithm
$signer->offset = $new_offset
$response = $client->get($URL);
Contributing
Yes
License
MIT License applies.
All versions of guzzle-hawk with dependencies
PHP Build Version
Package Version
The package complex-media/guzzle-hawk contains the following files
Loading the files please wait ....