PHPackages                             fawno/ntlm-authentication - 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. fawno/ntlm-authentication

ActiveCakephp-plugin[Authentication &amp; Authorization](/categories/authentication)

fawno/ntlm-authentication
=========================

NTLM Authenticator for CakePHP 4.3

2.0.0(1y ago)024MITPHPPHP &gt;=7.2

Since Apr 26Pushed 1y ago2 watchersCompare

[ Source](https://github.com/fawno/NTLMAuthenticator)[ Packagist](https://packagist.org/packages/fawno/ntlm-authentication)[ RSS](/packages/fawno-ntlm-authentication/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (3)Versions (4)Used By (0)

[![GitHub license](https://camo.githubusercontent.com/95c35a36ab6e8eb3d6d828f1c8ad0624235f8f1cfe3cb2a08ff6189d777430b4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6661776e6f2f4e544c4d41757468656e74696361746f72)](https://github.com/fawno/NTLMAuthenticator/blob/master/LICENSE)[![GitHub release](https://camo.githubusercontent.com/ad3bdfa91ff18ef172e2bb9acfe4acb2e404227cce49ebe1cffbf74f701d7ba9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6661776e6f2f4e544c4d41757468656e74696361746f72)](https://github.com/fawno/NTLMAuthenticator/releases)[![Packagist](https://camo.githubusercontent.com/ac32fc51385ee4cb433afb0a6ce5c7ab27c4fa3a68a134a446e710d6c5381988/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6661776e6f2f6e746c6d2d61757468656e7469636174696f6e)](https://packagist.org/packages/fawno/ntlm-authentication)[![Packagist Downloads](https://camo.githubusercontent.com/5f49f3e881d8e47238c5be2f71c4b6131e104170a4358da95f1031f9e7b43098/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6661776e6f2f6e746c6d2d61757468656e7469636174696f6e)](https://packagist.org/packages/fawno/ntlm-authentication/stats)[![GitHub issues](https://camo.githubusercontent.com/33393a9c85113dabda13bf745bf78ffdef4b350b7dee7a52876a56e7af5c17f0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f6661776e6f2f4e544c4d41757468656e74696361746f72)](https://github.com/fawno/NTLMAuthenticator/issues)[![GitHub forks](https://camo.githubusercontent.com/07467f22fd170bf72366a63a3a22f9b6ead7cb1f55c6b6e64adad6af1f501677/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f6661776e6f2f4e544c4d41757468656e74696361746f72)](https://github.com/fawno/NTLMAuthenticator/network)[![GitHub stars](https://camo.githubusercontent.com/9a1c42c3fb625472dd36f3164c3d7b67a58debd06775d6ce5d83cebd2f928ba0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f6661776e6f2f4e544c4d41757468656e74696361746f72)](https://github.com/fawno/NTLMAuthenticator/stargazers)

NTLM Authenticator for CakePHP 4 Authentication plugin
======================================================

[](#ntlm-authenticator-for-cakephp-4-authentication-plugin)

This plugin provides an NTLM Authenticator for CakePHP 4 authentication plugin.

Table of contents
=================

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
    - [Apache with SSPI NTLM based authentication module (mod\_authn\_ntlm)](#apache-with-sspi-ntlm-based-authentication-module-mod_authn_ntlm)
    - [NTLMAuthenticator](#ntlmauthenticator)

Requirements
------------

[](#requirements)

- PHP &gt;= 7.2.0
- Apache 2.4 SSPI NTLM based authentication module ([mod\_authn\_ntlm](https://github.com/TQsoft-GmbH/mod_authn_ntlm))
- CakePHP &gt;= 4.3.0
- [CakePHP Authentication](https://book.cakephp.org/authentication/2/en/index.html) &gt;= 2.0

Optional:

- ext-ldap ([LDAP php extension](https://www.php.net/manual/en/book.ldap.php))

[TOC](#table-of-contents)

Installation
------------

[](#installation)

Install this plugin into your application using [composer](https://getcomposer.org):

- Add `fawno/ntlm-authentication` package to your project: ```
      composer require fawno/ntlm-authentication
    ```
- Load the NTLMAuthenticator in your `Application.php`: ```
    use Fawno\NTLM\Authenticator\NTLMAuthenticator;
    ```
- Load the NTLMAuthenticator in your Authentication Service (`Application.php`): ```
    // Load the authenticators. Session should be first.
    $service->loadAuthenticator('Authentication.Session');

    $service->loadAuthenticator(NTLMAuthenticator::class, [
        'domains' => [],
    ]);
    ```

[TOC](#table-of-contents)

Configuration
-------------

[](#configuration)

`exampledomain` short domain name

`example.com` full domain name

### Apache with SSPI NTLM based authentication module ([mod\_authn\_ntlm](https://github.com/TQsoft-GmbH/mod_authn_ntlm))

[](#apache-with-sspi-ntlm-based-authentication-module-mod_authn_ntlm)

Only routes with `/login` are authenticated with NTLM

`webroot\.htaccess`:

```

	AuthName "Example App"
	AuthType SSPI
	NTLMAuth On
	NTLMAuthoritative On
	NTLMDomain exampledomain
	NTLMOmitDomain Off     # keep domain name in userid string
	NTLMOfferBasic On      # let non-IE clients authenticate
	NTLMBasicPreferred Off # should basic authentication have higher priority
	NTLMUsernameCase lower
	Require valid-user

	AuthType None
	Require all granted

#Order allow,deny
#Allow from 192.168.0.0/16
Satisfy all
```

[TOC](#table-of-contents)

### NTLMAuthenticator

[](#ntlmauthenticator)

NTLM Authenticator can query through LDAP for user membership. This information is stored in the session and can be used for authorization (ACL).

```
$service->loadAuthenticator(NTLMAuthenticator::class, [
    'domains' => [
        'exampledomain' => [
            'ldap' => [
                'srv' => 'active-directory.example.com',
                'user' => base64_encode('user@example.com'),
                'pass' => base64_encode('UserPassword'),
                'dn' => 'OU=Departaments, DC=example, DC=com',
                'dn_users' => 'CN=Users, DC=example, DC=com',
            ],
            'config' => [
                'some_key' => 'some_data',
            ],
        ],
        'exampledomain2' => [
            'ldap' => [
                'srv' => 'active-directory.example2.com',
                'user' => base64_encode('user@example2.com'),
                'pass' => base64_encode('UserPassword2'),
                'dn' => 'OU=Departaments, DC=example2, DC=com',
                'dn_users' => 'CN=Users, DC=example2, DC=com',
            ],
            'config' => [
                'some_key' => 'some_data',
            ],
        ],
    ],
]);
```

The configured credentials should have query-only access to the LDAP service and no other privileges within the domain.

`config` array is optional data can be stored in session auth data. It allows configuring the logo of the organization and other data common to the users of a domain that the application needs to use.

The application does not have any access to validated user passwords, all NTLM authentication is negotiated between the Apache server and the browser.

[TOC](#table-of-contents)

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance41

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

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

Every ~515 days

Total

3

Last Release

499d ago

Major Versions

0.0.1 → 1.0.02022-04-25

1.0.0 → 2.0.02025-02-18

### Community

Maintainers

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

---

Top Contributors

[![alphp](https://avatars.githubusercontent.com/u/8992091?v=4)](https://github.com/alphp "alphp (6 commits)")

---

Tags

authenticationauthenticatorcakephpcakephp-plugincakephp4ntlmntlm-authenticationAuthenticationcakephpauthenticatorNTLM

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/fawno-ntlm-authentication/health.svg)

```
[![Health](https://phpackages.com/badges/fawno-ntlm-authentication/health.svg)](https://phpackages.com/packages/fawno-ntlm-authentication)
```

###  Alternatives

[cakedc/users

Users Plugin for CakePHP

525928.0k20](/packages/cakedc-users)[dereuromark/cakephp-tinyauth

A CakePHP plugin to handle user authentication and authorization the easy way.

131240.2k13](/packages/dereuromark-cakephp-tinyauth)[admad/cakephp-jwt-auth

CakePHP plugin for authenticating using JSON Web Tokens

163762.9k8](/packages/admad-cakephp-jwt-auth)[andrej-griniuk/cakephp-two-factor-auth

CakePHP auth component and provider fot two-factor authentication

38110.9k](/packages/andrej-griniuk-cakephp-two-factor-auth)[bedita/manager

BEdita Manager - official admin webapp for BEdita4 API

131.2k](/packages/bedita-manager)[cakedc/auth

Auth objects for CakePHP

31666.4k3](/packages/cakedc-auth)

PHPackages © 2026

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