-
Notifications
You must be signed in to change notification settings - Fork 1
/
module.knowitop-multi-ldap-auth.php
executable file
·67 lines (60 loc) · 1.74 KB
/
module.knowitop-multi-ldap-auth.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
if (function_exists('ldap_connect'))
{
SetupWebPage::AddModule(
__FILE__, // Path to the current file, all other file names are relative to the directory containing this file
'knowitop-multi-ldap-auth/2.0.0',
array(
// Identification
//
'label' => 'User authentication based on multiple LDAP servers',
'category' => 'authentication',
// Setup
//
'dependencies' => array(
'authent-ldap/2.6.0'
),
'mandatory' => false,
'visible' => true,
// Components
//
'datamodel' => array(
'model.knowitop-multi-ldap-auth.php',
),
'data.struct' => array(),
'data.sample' => array(),
// Documentation
//
'doc.manual_setup' => '',
'doc.more_information' => '',
// Default settings
//
'settings' => array(
'debug' => false,
'ldap_settings' => array(
'your_ldap_config_name' => array(
'host' => 'localhost',
// host or IP address of your LDAP server
'port' => 389,
// LDAP port (std: 389)
'default_user' => '',
// User and password used for initial "Anonymous" bind to LDAP
'default_pwd' => '',
// Leave both blank, if anonymous (read-only) bind is allowed
'base_dn' => 'dc=yourcompany,dc=com',
// Base DN for User queries, adjust it to your LDAP schema
'user_query' => '(&(uid=%1$s)(inetuserstatus=ACTIVE))',
// Query used to retrieve each user %1$s => iTop login
// For Windows AD use (samaccountname=%1$s) or (userprincipalname=%1$s)
// Some extra LDAP options, refer to: http://www.php.net/manual/en/function.ldap-set-option.php for more info
'options' => array(
LDAP_OPT_PROTOCOL_VERSION => 3,
LDAP_OPT_REFERRALS => 0,
),
'start_tls' => false,
)
)
)
)
);
}