Merge pull request #161 from Typz/ldap

Implement LDAP user lookup.
This commit is contained in:
Frédéric Guillot
2014-07-04 12:43:44 -03:00
3 changed files with 50 additions and 8 deletions

View File

@@ -30,10 +30,29 @@ define('LDAP_SERVER', '');
// LDAP server port (389 by default)
define('LDAP_PORT', 389);
// User LDAP DN
// Example for ActiveDirectory: 'MYDOMAIN\\%s' or '%s@mydomain.local'
// Example for OpenLDAP: 'uid=%s,ou=People,dc=example,dc=com'
define('LDAP_USER_DN', '%s');
// By default, require certificate to be verified for ldaps:// style URL. Set to false to skip the verification.
define('LDAP_SSL_VERIFY', true);
// LDAP username to connect with. NULL for anonymous bind (by default).
define('LDAP_USERNAME', null);
// LDAP password to connect with. NULL for anonymous bind (by default).
define('LDAP_PASSWORD', null);
// LDAP account base, i.e. root of all user account
// Example: ou=people,dc=example,dc=com
define('LDAP_ACCOUNT_BASE', '');
// LDAP query pattern to use when searching for a user account
// Example for ActiveDirectory: '(&(objectClass=user)(sAMAccountName=%s))'
// Example for OpenLDAP: 'uid=%s'
define('LDAP_USER_PATTERN', '');
// Name of an attribute of the user account object which should be used as the full name of the user.
define('LDAP_ACCOUNT_FULLNAME', 'displayname');
// Name of an attribute of the user account object which should be used as the email of the user.
define('LDAP_ACCOUNT_EMAIL', 'mail');
// Enable/disable Google authentication
define('GOOGLE_AUTH', false);