Commit 8e527693 authored by jiangbowen's avatar jiangbowen

test conn

parent 2a010214
...@@ -21,23 +21,15 @@ Route::get('/', function () { ...@@ -21,23 +21,15 @@ Route::get('/', function () {
Route::get('/ad', function () { Route::get('/ad', function () {
$ad = new \Adldap\Adldap(); $ad = new \Adldap\Adldap();
$config = [ $config = [
'hosts' => ["172.20.100.201"], 'domain_controllers' => ["172.20.100.201"],
'base_dn'=>'ou=Users_hoto,dc=hoto,dc=test', 'base_dn'=>'ou=Users_hoto,dc=hoto,dc=test',
'username'=>'hcmadmin', 'admin_username'=>'hcmadmin',
'password'=>'hcmadmin123' 'admin_password'=>'hcmadmin123'
]; ];
$ad->addProvider($config); $ad->addProvider($config);
try{ try{
$provides = $ad->connect(); $provides = $ad->connect();
var_export($provides);
var_export('connect...');
var_export($config);
if ($provides) {
echo "success...";
} else {
echo "failed...";
}
}catch (Exception $e) { }catch (Exception $e) {
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment