<commit_before>Guzzle WSSE Middleware<br />[![Latest Stable Version](https://poser.pugx.org/eightpoints/guzzle-wsse-middleware/v/stable.png)](https://packagist.org/packages/eightpoints/guzzle-wsse-middleware) [![Total Downloads](https://poser.pugx.org/eightpoints/guzzle-wsse-middleware/downloads.png)](https://packagist.org/packages/eightpoints/guzzle-wsse-middleware) [![License](https://poser.pugx.org/eightpoints/guzzle-wsse-middleware/license.svg)](https://packagist.org/packages/eightpoints/guzzle-wsse-middleware)
==================
This middleware integrates [WSSE][1] funtionality into Guzzle, a PHP framework for building RESTful web service clients.


Requirements
------------
 - PHP 5.5 or above
 - [Guzzle PHP Framework][2]

 
Installation
------------
Using [composer][3]:

``` json
{
    "require": {
        "eightpoints/guzzle-wsse-middleware": "~3.0"
    }
}
```


Usage
-----
``` php
<?php 

$wsse  = new \EightPoints\Guzzle\WsseAuthMiddleware($username, $password);
$stack = \GuzzleHttp\HandlerStack::create();

// Add the wsse middleware to the handler stack.
$stack->push($wsse->attach());

$client   = new \GuzzleHttp\Client(['handler' => $stack]);
$response = $client->get('http://www.8points.de');
```

<commit_msg>added createdAt setter info, changed composer require version<commit_after>Guzzle WSSE Middleware<br />[![Latest Stable Version](https://poser.pugx.org/eightpoints/guzzle-wsse-middleware/v/stable.png)](https://packagist.org/packages/eightpoints/guzzle-wsse-middleware) [![Total Downloads](https://poser.pugx.org/eightpoints/guzzle-wsse-middleware/downloads.png)](https://packagist.org/packages/eightpoints/guzzle-wsse-middleware) [![License](https://poser.pugx.org/eightpoints/guzzle-wsse-middleware/license.svg)](https://packagist.org/packages/eightpoints/guzzle-wsse-middleware)
==================
This middleware integrates [WSSE][1] funtionality into Guzzle, a PHP framework for building RESTful web service clients.


Requirements
------------
 - PHP 5.5 or above
 - [Guzzle PHP Framework][2]

 
Installation
------------
Using [composer][3]:

``` json
{
    "require": {
        "eightpoints/guzzle-wsse-middleware": "^4.1.1"
    }
}
```


Usage
-----
``` php
<?php 

$wsse = new \EightPoints\Guzzle\WsseAuthMiddleware($username, $password);

# optional: set createdAt (if not, current time will be used automatically)
# useful if there is a small difference of time between client and server
$wsse->setCreatedAt(new \DateTime('-10 seconds));

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

// Add the wsse middleware to the handler stack.
$stack->push($wsse->attach());

$client   = new \GuzzleHttp\Client(['handler' => $stack]);
$response = $client->get('http://www.8points.de');
```


{'fraction_non_alphanumeric': 0.19209659714599342, 'fraction_numerical': 0.006952067325283571, 'mean_word_length': 4.48995983935743, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 14, 'https://': 12, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4749329', 'n_tokens_mistral': 953, 'n_tokens_neox': 878, 'n_words': 162}