2017 © Pedro PelĂĄez
 

library adldap2-bundle

Symfony Bundle for adldap2 library.

image

sgomez/adldap2-bundle

Symfony Bundle for adldap2 library.

  • Saturday, April 21, 2018
  • by decano
  • Repository
  • 1 Watchers
  • 2 Stars
  • 465 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 1 Open issues
  • 9 Versions
  • 4 % Grown

The README.md

Adldap2 Integration for Symfony

This bundle helps you to use adldap2 library with Symfony., (*1)

Installation

Step 1: Download the Bundle

Install the library via Composer by running the following command:, (*2)

composer require sgomez/adldap2-bundle

Step 2: Enable the Bundle

Next, enable the bundle in your app/AppKernel.php file:, (*3)

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Sgomez\Bundle\Adldap2Bundle\Adldap2Bundle(),
        // ...
    );
}

Step 3: Configure the bundle

You need to configure your connection. The parameters are the same that use Adldap2., (*4)

This is a sample configuration that you need to add in the app/config/config.yml file:, (*5)

adldap2:
    auto_connect: true
    connection_class: Adldap\Connections\Ldap
    connection_settings:
        domain_controllers: ["domain_controller_1", "domain_controller_2"]
        base_dn: "dc=domain,dc=com"
        admin_username: "username"
        admin_password: "password"
        account_suffix: "domain.com"
        port: 389
        follow_referrals: false
        use_ssl: false
        use_tls: false
        use_sso: false

You don't need to configure all values. See the original adldap2 documentation for more information., (*6)

Step 4: Profit!

A new service called 'adldap2' has been created. It's a configured instance of Adldap class. You can use it as usual:, (*7)


class DefaultController extends Controller { public function indexAction() { $user = $this->get('adldap2')->search()->find('username'); } }

TODO

  • UserProvider

The Versions

21/04 2018
21/04 2018