2017 © Pedro Peláez
 

library openldapobject

Use Object to Read/Write in a LDAP

image

toshy62/openldapobject

Use Object to Read/Write in a LDAP

  • Thursday, March 26, 2015
  • by Toshy62
  • Repository
  • 0 Watchers
  • 0 Stars
  • 41 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

OpenLdapObject

Build Status Version Code Climate, (*1)

Use Object to Read/Write in a LDAP

Installation

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:, (*2)

$ composer require openldapobject/openldapobject "~1"

This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation., (*3)

Or add the bundle in your composer.json and launch this command composer update, (*4)

...
    "require" : {
        ...
        "openldapobject/openldapobject": "~1.0",
        ...
    },
...

Step 2: Configuration

Add configuration keys in the app/config/parameters.yml and app/config/parameters.yml.dist and configure for your openldap :, (*5)

    ldap_hostname: ldap-test.univ.fr
    ldap_base_dn: 'dc=univ,dc=fr'
    ldap_dn: 'cn=login,ou=ldapusers,dc=univ,dc=fr'
    ldap_password: 'password'

Step 3: Use the Bundle

You can use this bundle like this :, (*6)

<?php
namespace AppBundle\Controller;

use OpenLdapObject\LdapClient\Connection;
use OpenLdapObject\LdapClient\Client;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{
    /**
     * @Route("/example", name="example")
     */
    public function exampleAction() {

        $ldap = new Connection($this->container->getParameter('ldap_hostname'), 389);

        $ldap->identify($this->container->getParameter('ldap_dn'), $this->container->getParameter('ldap_password'));

        $client = $ldap->connect();

        $client->setBaseDn($this->container->getParameter('ldap_base_dn'));

        $query = "(&(objectclass=*)(sn=Hetru))";

        $accounts = $client->search($query, array('*', 'memberof'), 0, 'ou=accounts');

    dump($accounts);
        ...
    }
}
...
...

The Versions

26/03 2015

dev-master

9999999-dev https://github.com/Toshy62/OpenLdapObject

Use Object to Read/Write in a LDAP

  Sources   Download

MIT

The Requires

 

by Avatar Toshy62

ldap object mapping openldap

26/03 2015

1.1.0alpha2

1.1.0.0-alpha2 https://github.com/Toshy62/OpenLdapObject

Use Object to Read/Write in a LDAP

  Sources   Download

MIT

The Requires

 

by Avatar Toshy62

ldap object mapping openldap

22/03 2015

1.1.0alpha

1.1.0.0-alpha https://github.com/Toshy62/OpenLdapObject

Use Object to Read/Write in a LDAP

  Sources   Download

MIT

The Requires

 

by Avatar Toshy62

ldap object mapping openldap

14/03 2015

1.0.x-dev

1.0.9999999.9999999-dev https://github.com/Toshy62/OpenLdapObject

Use Object to Read/Write in a LDAP

  Sources   Download

MIT

The Requires

 

by Avatar Toshy62

ldap object mapping openldap

14/03 2015

1.0.1

1.0.1.0 https://github.com/Toshy62/OpenLdapObject

Use Object to Read/Write in a LDAP

  Sources   Download

MIT

The Requires

 

by Avatar Toshy62

ldap object mapping openldap

07/03 2015

1.0.0

1.0.0.0 https://github.com/Toshy62/OpenLdapObject

Use Object to Read/Write in a LDAP

  Sources   Download

MIT

The Requires

 

by Avatar Toshy62

ldap object mapping openldap

07/03 2015

1.0.0RC

1.0.0.0-RC https://github.com/Toshy62/OpenLdapObject

Use Object to Read/Write in a LDAP

  Sources   Download

MIT

The Requires

 

by Avatar Toshy62

ldap object mapping openldap