maximilianoraul/yii2-openldap-user

Enable the use of OpenLDAP to authenticate users

0.0.4 2021-09-27 16:25 UTC

This package is auto-updated.

Last update: 2025-05-27 23:53:39 UTC


README

Enable the use of OpenLDAP to authenticate users

Installation

The preferred way to install this extension is through composer.

Either run

composer require maximilianoraul/yii2-openldap-user "*"

or add

"maximilianoraul/yii2-openldap-user": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by:

Add in your config (config/web.php for the basic app):

    'components' => [
        //...
        'user' => [
            'identityClass' => 'MaximilianoRaul\OpenLdap\model\User',
        ],
        //...
        'openldap' => [
            'class' => 'MaximilianoRaul\OpenLdap\Openldap',
            'host' => "ldap.example.int",
            'protocol' => "ldap",
            'port' => 389,
            'baseDn' => "dc=example,dc=int",
            'ldapVersion' => 3,
        ],
        //...