ngabor84 / guzzle-wsse-middleware
为 Guzzle HTTP 客户端提供的 WSSE 身份验证中间件
0.3.1
2019-12-11 16:32 UTC
Requires
- php: >=7.3
- guzzlehttp/guzzle: ^6.4
- psr/http-message: ^1.0
Requires (Dev)
- nunomaduro/phpinsights: ^1.11
- phpunit/phpunit: ^8.4
This package is auto-updated.
Last update: 2024-09-19 22:18:01 UTC
README
Guzzle WSSE 中间件
此身份验证中间件为 Guzzle HTTP 客户端添加 WSSE 签名功能。
安装
composer require ngabor84/guzzle-wsse-middleware
用法
<?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']);