<commit_before><?php

use Zend\Expressive\AppFactory;
use StoragelessSession\Http\SessionMiddleware;
use Lcobucci\JWT\Signer\Hmac\Sha256;
use Lcobucci\JWT\Parser;
use StoragelessSession\Session\Data;
use Psr\Http\Message\ResponseInterface;

require_once __DIR__ . '/../vendor/autoload.php';

// To run this example, you will need to run (in the project directory)
// composer require zendframework/zend-expressive
// composer require zendframework/zend-servicemanager

// the example uses a symmetric key, but asymmetric keys can also be used.
// $privateKey = new Key('file://private_key.pem');
// $publicKey = new Key('file://public_key.pem');
$privateKey = $publicKey = 'I do not care';

$app = AppFactory::create();

$app
    ->pipe(new SessionMiddleware(
        new Sha256(),
        $privateKey,
        $publicKey,
        \Dflydev\FigCookies\SetCookie::create('foo'),
        new Parser(),
        14400<commit_msg>More documentation for the examples<commit_after><?php

use Zend\Expressive\AppFactory;
use StoragelessSession\Http\SessionMiddleware;
use Lcobucci\JWT\Signer\Hmac\Sha256;
use Lcobucci\JWT\Parser;
use StoragelessSession\Session\Data;
use Psr\Http\Message\ResponseInterface;

require_once __DIR__ . '/../vendor/autoload.php';

// To run this example, you will need to run (in the project directory)
// `composer require zendframework/zend-expressive`
// `composer require zendframework/zend-servicemanager`

// the example uses a symmetric key, but asymmetric keys can also be used.
// $privateKey = new Key('file://private_key.pem');
// $publicKey = new Key('file://public_key.pem');

// simply run `php -S localhost:8888 index.php`
// then point your browser at `http://localhost:8888/get`
$privateKey = $publicKey = 'I do not care';

$app = AppFactory::create();

$app
    ->pipe(new SessionMiddleware(
        new Sha256(),
        $privateKey,
        $publicKey,
        \Dflydev\FigCookies\SetCookie::create('foo'),
        new Parser(),
        14400
{'fraction_non_alphanumeric': 0.1292276627965674, 'fraction_numerical': 0.01514386673397274, 'mean_word_length': 3.8223844282238444, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5856396', 'n_tokens_mistral': 660, 'n_tokens_neox': 636, 'n_words': 161}