mirror of
https://github.com/YunoHost/SSOwat.git
synced 2024-09-03 20:06:27 +02:00
adding credentials for non-anonymous bind
This commit is contained in:
parent
1bceee6d64
commit
648b552297
1 changed files with 5 additions and 1 deletions
|
@ -298,7 +298,11 @@ function set_headers (user)
|
||||||
-- If the user information is not in cache, open an LDAP connection and
|
-- If the user information is not in cache, open an LDAP connection and
|
||||||
-- fetch it.
|
-- fetch it.
|
||||||
if not cache:get(user.."-"..conf["ldap_identifier"]) then
|
if not cache:get(user.."-"..conf["ldap_identifier"]) then
|
||||||
ldap = lualdap.open_simple(conf["ldap_host"])
|
ldap = lualdap.open_simple(
|
||||||
|
conf["ldap_host"],
|
||||||
|
conf["ldap_identifier"].."=".. user ..","..conf["ldap_group"],
|
||||||
|
cache:get(user.."-password")
|
||||||
|
)
|
||||||
ngx.log(ngx.NOTICE, "Reloading LDAP values for: "..user)
|
ngx.log(ngx.NOTICE, "Reloading LDAP values for: "..user)
|
||||||
for dn, attribs in ldap:search {
|
for dn, attribs in ldap:search {
|
||||||
base = conf["ldap_identifier"].."=".. user ..","..conf["ldap_group"],
|
base = conf["ldap_identifier"].."=".. user ..","..conf["ldap_group"],
|
||||||
|
|
Loading…
Add table
Reference in a new issue