Skip to content
Adldap2 integration into Nette Framework
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/DI
tests
.gitignore
LICENSE
README.md
composer.json
phpstan.neon

README.md

Adldap2

Adldap2 integration into Nette Framework.

Installation

The recommended way to is via Composer:

composer require surda/adldap2-nette

After that you have to register extension in config.neon:

extensions:
    adldap: Surda\Adldap\DI\AdldapExtension

Minimal configuration

adldap:
    hosts: { 'corp-dc1.corp.acme.org', 'corp-dc2.corp.acme.org' }
    base_dn: 'dc=corp,dc=acme,dc=org'
    username: 'admin'
    password: 'password'

List of all configuration options:

adldap:
    # Mandatory configuration options
    hosts: { 'corp-dc1.corp.acme.org', 'corp-dc2.corp.acme.org' }
    base_dn: 'dc=corp,dc=acme,dc=org'
    username: 'admin'
    password: 'password'

    # Optional configuration options
    schema: \Adldap\Schemas\ActiveDirectory
    account_prefix: 'ACME-'
    account_suffix: '@@acme.org'
    port: 389
    follow_referrals: FALSE
    use_ssl: false
    use_tls: false
    version: 3
    timeout: 5

Usage

use Adldap\Adldap;

class Foo
{
    /** @var Adldap */
    private $adldap;

    /**
     * @param Adldap $adldap
     */
    public function __construct(Adldap $adldap)
    {
        $this->adldap = $adldap;
    }

    public function bar()
    {
        $provider = $this->adldap->connect();
        // ...
    }
}

More in the Adldap2 documentation.

You can’t perform that action at this time.