php - How to set up a configuration of LDAP in a Laravel project -


i new use ldap, , should set ldap in laravel project stores users' information. have used following library below , experienced troubles.

https://github.com/adldap2/adldap2-laravel

1) can test ldap on localhost? (without domains) following setting not work.

        $config = [              // mandatory configuration options              'domain_controllers'    => ['corp.localhost'],             'base_dn'               => 'dc=localhost',             'admin_username'        => 'username',             'admin_password'        => 'password'  ] 

2) relation between db , ldap?

for example, facade below affected both 'user' table on db , 'user' information on ldap?

use adldap\laravel\facades\adldap;  // finding user. $user = adldap::search()->users()->find('john doe');  // searching user. $search = adldap::search()->where('cn', '=', 'john doe')->get();  // authenticating against ldap server. if (adldap::auth()->attempt($username, $password)) {     // passed! }  // running operation under different connection: $users = adldap::getprovider('other-connection')->search()->users()->get();  // creating user. $user = adldap::make()->user([     'cn' => 'john doe', ]);  $user->save(); 

i have searched many on google , theories... , must misunderstood ldap. laravel library client side , should set ldap server on location? my destination setting storage of users' information on synology nas using ldap.(i not know why should use ldap. db can save users' information..)

usually don't use ldap in web system if there not ldap server being used forced, coerced , tortured use :) if can, avoid using ldap.

having said that, in small tutorial find how test ldap connections , how set adminless ldap auth system in laravel 5:

laravel-simple-ldap-auth

you have ask administrator real connection data of production ldap server.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -