PHPackages                             arvindh93/cakephp-ldap-utility - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. arvindh93/cakephp-ldap-utility

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

arvindh93/cakephp-ldap-utility
==============================

Cakephp-ldap-utility plugin for CakePHP

v1.0(8y ago)04PHPPHP &gt;=5.5.9

Since Feb 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/arvindh93/cakephp-ldap-utility)[ Packagist](https://packagist.org/packages/arvindh93/cakephp-ldap-utility)[ RSS](/packages/arvindh93-cakephp-ldap-utility/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

Cakephp-ldap-auth plugin for CakePHP
====================================

[](#cakephp-ldap-auth-plugin-for-cakephp)

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

[](#requirements)

- CakePHP 3.1+

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

[](#installation)

You can install this plugin into your CakePHP application using [composer](http://getcomposer.org).

The recommended way to install composer packages is:

```
composer require arvindh93/Cakephp-ldap

```

Usage
-----

[](#usage)

In your app's `config/bootstrap.php` add:

```
// In config/bootstrap.php
Plugin::load('LdapUtility');
```

or using cake's console:

```
./bin/cake plugin load LdapUtility
```

Configuration:
--------------

[](#configuration)

Basic configuration for creating ldap handler instance

```
	$config = [
		'host' => 'ldap.example.com',
        'port' => 389,
        'baseDn' => 'dc=example,dc=com',
        'startTLS' => true,
        'hideErrors' => true,
        'commonBindDn' => 'cn=readonly.user,ou=people,dc=example,dc=com',
        'commonBindPassword' => 'secret'
	]
	$ldapHandler = new LdapUtility\Ldap($config);
```

Setup Ldap authentication config in Controller

```
    // In your controller, for e.g. src/Api/AppController.php
    public function initialize()
    {
        parent::initialize();

        $this->loadComponent('Auth', [
            'storage' => 'Memory',
            'authenticate', [
                'LdapUtility.Ldap' => [
					'host' => 'ldap.example.com',
			        'port' => 389,
			        'baseDn' => 'dc=example,dc=com',
			        'startTLS' => true,
			        'hideErrors' => true,
			        'commonBindDn' => 'cn=readonly.user,ou=people,dc=example,dc=com',
			        'commonBindPassword' => 'secret',
			        'fields' => [
			            'username' => 'cn',
			            'suffix' => 'ou=people,dc=test,dc=com'
			        ]
				]
            ],

            'unauthorizedRedirect' => false,
            'checkAuthIn' => 'Controller.initialize',
        ]);
    }
```

Usage:
------

[](#usage-1)

\#Creating Query object for Search/Read operation: Search - $ldapHandler-&gt;search() Read - $ldapHandler-&gt;read()

\#Operations on query object: select() - accepts an array of attributes to fetch from ldap entry setBaseDn() - accepts baseDn string defaults to config - baseDn where() - accepts filter string first() - execute the query and get the first entry details as array all() - executes the query and get all the possible entries as array

Example:
--------

[](#example)

Search for entry with cn starting with test

```
	$ldapHandler->search()
		->setBaseDn('ou=people,dc=example,dc=com')
		->select(['cn', 'sn', 'mail'])
		->where('cn=test*')
		->all()
```

Search for entry with cn starting with test and get first entry

```
	$ldapHandler->search()
		->setBaseDn('ou=people,dc=example,dc=com')
		->select(['cn', 'sn', 'mail'])
		->where('cn=test*')
		->first()
```

Read a particular entry with cn=test.user

```
	$ldapHandler->read()
		->setBaseDn('cn=test.user,ou=people,dc=example,dc=com')
		->select(['cn', 'sn', 'mail'])
		->where('cn=test.user')
		->first()
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

3003d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/401b2b780b1e3322d929f5b9a45b4a5b184b530698e2123c6e18c95b9acbce7d?d=identicon)[arvindh93](/maintainers/arvindh93)

---

Top Contributors

[![arvindh93](https://avatars.githubusercontent.com/u/3939420?v=4)](https://github.com/arvindh93 "arvindh93 (10 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/arvindh93-cakephp-ldap-utility/health.svg)

```
[![Health](https://phpackages.com/badges/arvindh93-cakephp-ldap-utility/health.svg)](https://phpackages.com/packages/arvindh93-cakephp-ldap-utility)
```

###  Alternatives

[dereuromark/cakephp-tools

A CakePHP plugin containing lots of useful and reusable tools

338920.1k32](/packages/dereuromark-cakephp-tools)[markstory/asset_compress

An asset compression plugin for CakePHP. Provides file concatenation and a flexible filter system for preprocessing and minification.

3761.0M11](/packages/markstory-asset-compress)[dereuromark/cakephp-shim

A CakePHP plugin to shim applications between major framework versions.

401.0M11](/packages/dereuromark-cakephp-shim)[cakedc/cakephp-phpstan

CakePHP plugin extension for PHPStan.

40676.6k31](/packages/cakedc-cakephp-phpstan)[dereuromark/cakephp-dto

A CakePHP plugin for generating immutable Data Transfer Objects with full type safety

2988.9k3](/packages/dereuromark-cakephp-dto)[dereuromark/cakephp-geo

A CakePHP plugin around geocoding tools and helpers.

51174.9k4](/packages/dereuromark-cakephp-geo)

PHPackages © 2026

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