2017 © Pedro Peláez
 

library lib-hawk-authentication-guzzle-subscriber

Guzzle subscriber for Hawk Authentication

image

vytautasgimbutas/lib-hawk-authentication-guzzle-subscriber

Guzzle subscriber for Hawk Authentication

  • Sunday, March 15, 2015
  • by vytautasgimbutas
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 33 % Grown

The README.md

Guzzle Subscriber for Hawk Authentication

Hawk specification can be found here: http://alexbilbie.com/2012/11/hawk-a-new-http-authentication-scheme/, (*1)

[Using Symfony2? Check out Hawk Authentication bundle that uses Symfony2 Security component.][1], (*2)

Usage

use Tornado\Component\HawkAuthentication\HawkAuthenticationSubscriber;
use Dflydev\Hawk\Client\ClientBuilder;
use Dflydev\Hawk\Credentials\Credentials;
use GuzzleHttp\Client;

$id = '12345';
$secret = 'asd';

$client = ClientBuilder::create()->build();
$credentials = new Credentials($secret, 'sha256', $id);

$hawkAuthenticationPlugin = new HawkAuthenticationSubscriber(
    $client,
    $credentials
);

$httpClient = new Client();
/** @var \GuzzleHttp\Message\Response $response */
$response = $httpClient->post('https://test.dev/app_dev.php/rest?a=b', [
    'json'        => array('a' => 'b'),
    'subscribers' => array($hawkAuthenticationPlugin),
]);

The Versions

15/03 2015

v1.0.1

1.0.1.0

Guzzle subscriber for Hawk Authentication

  Sources   Download

MIT

The Requires

 

by Vytautas Gimbutas

authentication subscriber guzzle hawk

10/10 2014

dev-master

9999999-dev

Guzzle subscriber for Hawk Authentication

  Sources   Download

MIT

The Requires

 

by Vytautas Gimbutas

10/10 2014

v1.0.0

1.0.0.0

Guzzle subscriber for Hawk Authentication

  Sources   Download

MIT

The Requires

 

by Vytautas Gimbutas