module.authent-ldap.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. SetupWebPage::AddModule(
  3. __FILE__, // Path to the current file, all other file names are relative to the directory containing this file
  4. 'authent-ldap',
  5. array(
  6. // Identification
  7. //
  8. 'label' => 'User authentication based on LDAP',
  9. 'category' => 'authentication',
  10. // Setup
  11. //
  12. 'dependencies' => array(
  13. ),
  14. 'mandatory' => false,
  15. 'visible' => true,
  16. // Components
  17. //
  18. 'datamodel' => array(
  19. 'model.authent-ldap.php',
  20. ),
  21. 'dictionary' => array(
  22. 'en.dict.authent-ldap.php',
  23. ),
  24. 'data.struct' => array(
  25. //'data.struct.authent-ldap.xml',
  26. ),
  27. 'data.sample' => array(
  28. //'data.sample.authent-ldap.xml',
  29. ),
  30. // Documentation
  31. //
  32. 'doc.manual_setup' => '',
  33. 'doc.more_information' => '',
  34. // Default settings
  35. //
  36. 'settings' => array(
  37. 'host' => 'localhost', // host or IP address of your LDAP server
  38. 'port' => 389, // LDAP port (std: 389)
  39. 'default_user' => '', // User and password used for initial "Anonymous" bind to LDAP
  40. 'default_pwd' => '', // Leave both blank, if anonymous (read-only) bind is allowed
  41. 'base_dn' => 'dc=yourcompany,dc=com', // Base DN for User queries, adjust it to your LDAP schema
  42. 'user_query' => '(&(uid=%1$s)(inetuserstatus=ACTIVE))', // Query used to retrieve each user %1$s => iTop login
  43. // For Windows AD use (samaccountname=%1$s) or (userprincipalname=%1$s)
  44. // Some extra LDAP options, refer to: http://www.php.net/manual/en/function.ldap-set-option.php for more info
  45. 'options' => array(
  46. LDAP_OPT_PROTOCOL_VERSION => 3,
  47. LDAP_OPT_REFERRALS => 0,
  48. ),
  49. ),
  50. )
  51. );
  52. ?>