PHPackages                             michalkortas/webservicentlm - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. michalkortas/webservicentlm

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

michalkortas/webservicentlm
===========================

Override default SoapClient class to connect webservice with NTLM Windows authentication

1.0.0(5y ago)317MITPHP

Since Jul 2Pushed 5y ago1 watchersCompare

[ Source](https://github.com/michalkortas/webservicentlm)[ Packagist](https://packagist.org/packages/michalkortas/webservicentlm)[ Docs](https://webroad.dev/packages/webservicentlm/documentation)[ RSS](/packages/michalkortas-webservicentlm/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Webservice with NTLM Windows Authentication
===========================================

[](#webservice-with-ntlm-windows-authentication)

Override default SoapClient class to connect webservice with NTLM Windows authentication

Licence
-------

[](#licence)

MIT

Installation via Composer
-------------------------

[](#installation-via-composer)

```
composer require michalkortas/webservicentlm

```

### Laravel 5.5 and earlier

[](#laravel-55-and-earlier)

Register new ServiceProvider in config/app.php

```
michalkortas\WebserviceNtlm\WebserviceNtlmProvider::class
```

Register new Alias in config/app.php

```
'NtlmSoapService' => michalkortas\WebserviceNtlm\Services\NtlmSoapService::class
```

Usage
-----

[](#usage)

#### Set credentials

[](#set-credentials)

Just add to your .enf file:

```
NTLM_DOMAIN="domain"
NTLM_USER="user"
NTLM_PASSWORD="password"
```

#### Init connection

[](#init-connection)

```
$client = NtlmSoapService::initClient('https://your_webservice_url');
$data = $client->webserviceMethod();
```

#### Change connection

[](#change-connection)

Package use config/ntlmsoapservice.php file to set domain\\user credential. If you want to connect to other webservices with other credentials, set new credential type in this file, e.g.:

```
return [
    'default' => [
        'domain' => env('NTLM_DOMAIN', 'domain'),
        'user' => env('NTLM_USER', 'user'),
        'password' => env('NTLM_PASSWORD', 'password'),
    ],
    'other_credentials' => [
        'domain' => 'domain2',
        'user' => 'user2',
        'password' => 'user3',
    ],
];
```

Add credential name as second initClient() param:

```
$client = NtlmSoapService::initClient('https://other_webservice_url', 'other_credentials');
$data = $client->webserviceMethod();
```

#### Headers

[](#headers)

If you want add some headers to connection, just type:

```
$client = NtlmSoapService::initClient('https://your_webservice_url');

$header = new \SoapHeader( 'http://schemas.xmlsoap.org/soap/envelope/', 'Header');
$client->__setSoapHeaders($header);

$data = $client->webserviceMethod();
```

#### Get last request

[](#get-last-request)

If you want to show last request (e.g. send XML), check \_\_getLastRequest() method:

```
$client = NtlmSoapService::initClient('https://your_webservice_url');

$header = new \SoapHeader( 'http://schemas.xmlsoap.org/soap/envelope/', 'Header');
$client->__setSoapHeaders($header);

$data = $client->webserviceMethod();

var_dump($client->__getLastRequest());
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2140d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca7317f2183e9e3155976155b51d55cc79c0028b39b6559a6a16a09a6811e464?d=identicon)[michalkortas](/maintainers/michalkortas)

---

Top Contributors

[![michalkortas](https://avatars.githubusercontent.com/u/1836004?v=4)](https://github.com/michalkortas "michalkortas (5 commits)")

---

Tags

Authenticationsoapactive directorydomainwindowswebserviceNTLM

### Embed Badge

![Health badge](/badges/michalkortas-webservicentlm/health.svg)

```
[![Health](https://phpackages.com/badges/michalkortas-webservicentlm/health.svg)](https://phpackages.com/packages/michalkortas-webservicentlm)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[league/oauth2-client

OAuth 2.0 Client Library

3.8k118.6M1.2k](/packages/league-oauth2-client)[google/auth

Google Auth Library for PHP

1.4k272.7M162](/packages/google-auth)[pragmarx/google2fa

A One Time Password Authentication package, compatible with Google Authenticator.

2.0k82.4M164](/packages/pragmarx-google2fa)[paragonie/sodium_compat

Pure PHP implementation of libsodium; uses the PHP extension if it exists

934131.6M155](/packages/paragonie-sodium-compat)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
