Commit 8e527693 authored by jiangbowen's avatar jiangbowen

test conn

parent 2a010214
......@@ -21,23 +21,15 @@ Route::get('/', function () {
Route::get('/ad', function () {
$ad = new \Adldap\Adldap();
$config = [
'hosts' => ["172.20.100.201"],
'domain_controllers' => ["172.20.100.201"],
'base_dn'=>'ou=Users_hoto,dc=hoto,dc=test',
'username'=>'hcmadmin',
'password'=>'hcmadmin123'
'admin_username'=>'hcmadmin',
'admin_password'=>'hcmadmin123'
];
$ad->addProvider($config);
try{
$provides = $ad->connect();
var_export($provides);
var_export('connect...');
var_export($config);
if ($provides) {
echo "success...";
} else {
echo "failed...";
}
}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