Coder Social home page Coder Social logo

adldap2-bundle's Introduction

Adldap2 Integration for Symfony

This bundle helps you to use adldap2 library with Symfony.

Installation

Step 1: Download the Bundle

Install the library via Composer by running the following command:

composer require sgomez/adldap2-bundle

Step 2: Enable the Bundle

Next, enable the bundle in your app/AppKernel.php file:

<?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.

This is a sample configuration that you need to add in the app/config/config.yml file:

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.

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:

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

TODO

  • UserProvider

adldap2-bundle's People

Contributors

sgomez avatar steppinghat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.