PHP code example of davedevelopment / guzzle-wsse-auth-plugin

1. Go to this page and download the library: Download davedevelopment/guzzle-wsse-auth-plugin library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

davedevelopment / guzzle-wsse-auth-plugin example snippets

 php
 

e __DIR__ . '/src/Atst/Guzzle/Http/Plugin/WsseAuthPlugin.php';

$wsse = new Atst\Guzzle\Http\Plugin\WsseAuthPlugin("my_username", "my_password");
$client = new Guzzle\Service\Client("http://example.com");
$client->getEventDispatcher()->addSubscriber($wsse);
$response = $client->get("/someapi")->send();
 php
 

$wsse = new Atst\Guzzle\Http\Plugin\WsseAuthPlugin("my_username", "my_password", function($nonce, $created, $password) {
    return md5($nonce . $created . $password);
});