PHP code example of rusowyler / guzzle-wsse-auth-plugin
1. Go to this page and download the library: Download rusowyler/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/ */
rusowyler / guzzle-wsse-auth-plugin example snippets
php
e __DIR__ . '/src/Ebowe/Guzzle/Http/Plugin/WsseAuthPlugin.php';
$wsse = new \Ebowe\Guzzle\Http\Plugin\WsseAuthPlugin("my_username", "my_password");
$client = new Guzzle\Service\Client("http://example.com");
$client->getEmitter()->attach($wsse);
$response = $client->get("/someapi")->send();
php
$wsse = new Ebowe\Guzzle\Http\Plugin\WsseAuthPlugin("my_username", "my_password", function($nonce, $created, $password) {
return md5($nonce . $created . $password);
});