auth.conf.dist.php 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. /* For licensing terms, see /license.txt */
  3. /**
  4. * Configuration file for all authentication methods. Uncomment and configure only the section(s) you need.
  5. * @package chamilo.conf.auth
  6. */
  7. /**
  8. * Facebook
  9. */
  10. /*
  11. * Decomment those lines and put your facebook app parameters here
  12. * Find them here : https://developers.facebook.com/apps/
  13. $facebook_config = array( 'appId' => 'APPID',
  14. 'secret' => 'secret app',
  15. 'return_url' => api_get_path(WEB_PATH).'?action=fbconnect'
  16. );
  17. */
  18. /**
  19. * Shibboleth
  20. */
  21. // $shibb_login = ...;
  22. /**
  23. * LDAP
  24. */
  25. /**
  26. * Array of connection parameters
  27. **/
  28. $extldap_config = array(
  29. //base dommain string
  30. 'base_dn' => 'DC=cblue,DC=be',
  31. //admin distinguished name
  32. 'admin_dn' => 'CN=admin,dc=cblue,dc=be',
  33. //admin password
  34. 'admin_password' => 'pass',
  35. //ldap host
  36. 'host' => array('1.2.3.4', '2.3.4.5', '3.4.5.6'),
  37. // filter
  38. // 'filter' => '', // no () arround the string
  39. //'port' => , default on 389
  40. //protocl version (2 or 3)
  41. 'protocol_version' => 3,
  42. // set this to 0 to connect to AD server
  43. 'referrals' => 0,
  44. //String used to search the user in ldap. %username will ber replaced by the username.
  45. //See extldap_get_user_search_string() function below
  46. // 'user_search' => 'sAMAccountName=%username%', // no () arround the string
  47. 'user_search' => 'uid=%username%', // no () arround the string
  48. //encoding used in ldap (most common are UTF-8 and ISO-8859-1
  49. 'encoding' => 'UTF-8',
  50. //Set to true if user info have to be update at each login
  51. 'update_userinfo' => true
  52. );
  53. /**
  54. * Correspondance array between chamilo user info and ldap user info
  55. * This array is of this form :
  56. * '<chamilo_field> => <ldap_field>
  57. *
  58. * If <ldap_field> is "func", then the value of <chamilo_field> will be the return value of the function
  59. * extldap_get_<chamilo_field>($ldap_array)
  60. * In this cas you will have to declare the extldap_get_<chamilo_field> function
  61. *
  62. * If <ldap_field> is a string beginning with "!", then the value will be this string without "!"
  63. *
  64. * If <ldap_field> is any other string then the value of <chamilo_field> will be
  65. * $ldap_array[<ldap_field>][0]
  66. *
  67. * If <ldap_field> is an array then its value will be an array of values with the same rules as above
  68. *
  69. **/
  70. $extldap_user_correspondance = array(
  71. 'firstname' => 'givenName',
  72. 'lastname' => 'sn',
  73. 'status' => 'func',
  74. 'admin' => 'func',
  75. 'email' => 'mail',
  76. 'auth_source' => '!extldap',
  77. //'username' => ,
  78. 'language' => '!english',
  79. 'password' => '!PLACEHOLDER',
  80. 'extra' => array(
  81. 'title' => 'title',
  82. 'globalid' => 'employeeID',
  83. 'department' => 'department',
  84. 'country' => 'co',
  85. 'bu' => 'Company')
  86. );
  87. /**
  88. * OpenID
  89. */
  90. $langMainInfo = 'You may login to this site using an OpenID. You may add your OpenId URLs below, and also see a list of any OpenIDs which have already been added.';
  91. $langMainInfoDetail = '<p>OpenID is a secure way to use one user ID and password to log in to many web sites without special software, giving the same password to each site, or losing control over which information is shared with each site that you visit.</p>';
  92. $langMainInfoDetail .= '<p>Users can create accounts using their OpenID, assign one or more OpenIDs to an existing account, and log in using an OpenID. This lowers the barrier to registration, which is good for the site, and offers convenience and security to the users. Logging in via OpenID is far more secure than cross-site logins using drupal.module.</p>';
  93. $langMainInfoDetail .= '<p>More information on OpenID is available at <a href="http://openid.net">OpenID.net</a></p>';
  94. /**
  95. * CAS
  96. */
  97. //$cas = ...;