ngabor84/guzzle-wsse-middleware

WSSE authentication middleware for Guzzle HTTP Client

0.3.1 2019-12-11 16:32 UTC

README

Codeship Status for ngabor84/guzzle-wsse-middleware GitHub license

Guzzle WSSE Middleware

This authentication middleware add WSSE sign functionality to Guzzle Http Client.

Installation

composer require ngabor84/guzzle-wsse-middleware

Usage

<?php

$wsseMiddleware = new \Guzzle\Http\Middleware\WsseMiddleware($username, $password);

$stack = \GuzzleHttp\HandlerStack::create();

$stack->push($wsseMiddleware);

$client   = new \GuzzleHttp\Client(['handler' => $stack]);

// Important: set the auth option to wsse to activate the middleware
$response = $client->get('http://www.8points.de', ['auth' => 'wsse']);