File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 7
7
use CodeDredd \Soap \Driver \ExtSoap \ExtSoapEngineFactory ;
8
8
use CodeDredd \Soap \Exceptions \NotFoundConfigurationException ;
9
9
use CodeDredd \Soap \Exceptions \SoapException ;
10
+ use CodeDredd \Soap \Middleware \BasicAuthMiddleware ;
10
11
use CodeDredd \Soap \Middleware \CisDhlMiddleware ;
11
12
use CodeDredd \Soap \Middleware \WsseMiddleware ;
12
13
use GuzzleHttp \Client ;
27
28
use Soap \ExtSoapEngine \Transport \TraceableTransport ;
28
29
use Soap \ExtSoapEngine \Wsdl \PassThroughWsdlProvider ;
29
30
use Soap \ExtSoapEngine \Wsdl \WsdlProvider ;
31
+ use Soap \Psr18Transport \Middleware \RemoveEmptyNodesMiddleware ;
30
32
use Soap \Psr18Transport \Psr18Transport ;
31
33
use Soap \Psr18Transport \Wsdl \Psr18Loader ;
32
34
use Soap \Psr18WsseMiddleware \WsaMiddleware ;
@@ -196,8 +198,10 @@ public function withBasicAuth($username, ?string $password = null)
196
198
['username ' => $ username , 'password ' => $ password ] = $ username ;
197
199
}
198
200
199
- $ this ->middlewares = array_merge_recursive ($ this ->middlewares , [
200
- new BasicAuthMiddleware ($ username , $ password ),
201
+ $ this ->withHeaders ([
202
+ 'Authorization ' => sprintf ('Basic %s ' , base64_encode (
203
+ sprintf ('%s:%s ' , $ username , $ password )
204
+ ))
201
205
]);
202
206
203
207
return $ this ;
You can’t perform that action at this time.
0 commit comments