feature: LDAP auth update: alerts, api, remember me (#7335)

* feature: LDAP auth update: alerts, api, remember me
Defer ldap connection until it is needed (saves connections from pollers)
Add ability to use a bind account if the server does not allow anonymous bind.
If the server does allow anonymous bind, no config change is needed.
Use Config class

FYI, I have no way to test this.

TODO: update/validate docs

* prevent duplicate users in get_userlist()

* fix bug in Config get for auth_ldap_uid_attribute, `.` should have been `,`
Change case of uidNumber to match common configs (should be case insensitive anyway)

* revert uidnumber case changes and fix up user supplied ones as it is unintuitive that they need to be lowercase.
Add auth_ldap_binddn setting to allow more a more specific way to enter the bind user.
This commit is contained in:
Tony Murray
2017-10-30 14:28:40 -05:00
committed by Neil Lathwood
parent f92dae6915
commit 9d73cd401a
3 changed files with 205 additions and 101 deletions

View File

@@ -109,7 +109,7 @@ if (isset($options['r'])) {
if ($auth) {
$user_id = get_userid($test_username);
echo "User:\n";
echo "User ($user_id):\n";
if (function_exists('get_user')) {
$user = get_user($user_id);