PHPackages                             phpcodemaker/ci4-authldap - 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. phpcodemaker/ci4-authldap

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

phpcodemaker/ci4-authldap
=========================

CodeIgniter4 Authenticate User using LDAP protocol

v1.0(6y ago)74193MITPHPPHP &gt;=7.2

Since May 18Pushed 6y ago2 watchersCompare

[ Source](https://github.com/phpcodemaker/ci4-authldap)[ Packagist](https://packagist.org/packages/phpcodemaker/ci4-authldap)[ RSS](/packages/phpcodemaker-ci4-authldap/feed)WikiDiscussions master Synced 1w ago

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

AuthLdap
========

[](#authldap)

\[CodeIgniter4.0.3 LDAP Authentication\]

`composer require phpcodemaker/ci4-authldap:1.0`

Thanks to the Forumsys Site to make LDAP connection testing

To check your LDAP connection in local, Execute the below command in Terminal
/var/www/html$ ldapsearch -W -h ldap.forumsys.com -D "uid=riemann,dc=example,dc=com" -b "dc=example,dc=com"

\#Public Methods Authenticate User by UserName and Password `AuthLdap::authenticate($userName, $password);`

Retrieve All Users from LDAP directory
`AuthLdap::getAllUsers();`

Retrieve All Groups from LDAP directory
`AuthLdap::getAllGroups();`

Create your Own User Controller for login and logout as follows,

```
