wimski/soap-ntlm

SOAP client with NTLM authentication support

1.0.0 2022-10-19 08:41 UTC

This package is auto-updated.

Last update: 2024-12-19 13:16:17 UTC


README

PHPStan PHPUnit Coverage Status Latest Stable Version

Soap with NTLM

SOAP client with NTLM authentication support.

Changelog

View the changelog.

Install

composer require wimski/soap-ntlm

Usage

use Wimski\Curl\CurlResourceFactory;
use Wimski\SoapNtlm\ClientFactory;
use Wimski\SoapNtlm\NtlmService;
use Wimski\SoapNtlm\NtlmServiceConfig;
use Wimski\SoapNtlm\Stream\NtlmStreamWrapperFactory;

$curlResourceFactory = new CurlResourceFactory();

$config = new NtlmServiceConfig(
    'wsdl-uri',
    'ntlm-auth-username',
    'ntlm-auth-password',
    ['default' => 'option'],
);

$service = new NtlmService(
    $config,
    new ClientFactory($curlResourceFactory),
    new NtlmStreamWrapperFactory($curlResourceFactory),
);

$response = $service->request(
    'soap-endpoint',
    'action-function',
    ['some' => 'parameter'],
    ['extra' => 'option'],
);