liquid_feedback_frontend
annotate env/ldap/bind_as_app.lua @ 1859:02c34183b6df
Fixed wrong filename in INSTALL file
author | bsw |
---|---|
date | Tue Nov 28 18:54:51 2023 +0100 (17 months ago) |
parents | 58f48a8a202a |
children |
rev | line source |
---|---|
bsw@1071 | 1 -- binds to configured LDAP server with application's credentials |
bsw@1071 | 2 -- -------------------------------------------------------------------------- |
bsw@1071 | 3 -- |
bsw@1071 | 4 -- returns |
bsw@1071 | 5 -- ldap_conn: in case of success, an LDAP connection handle |
bsw@1071 | 6 -- err: in case of an error, an error code (string) |
bsw@1071 | 7 |
bsw@1071 | 8 function ldap.bind_as_app() |
bsw@1071 | 9 |
bsw@1071 | 10 local dn, password |
bsw@1071 | 11 |
bsw@1071 | 12 if config.ldap.bind_as then |
bsw@1071 | 13 dn = config.ldap.bind_as.dn |
bsw@1071 | 14 password = config.ldap.bind_as.password |
bsw@1071 | 15 end |
bsw@1071 | 16 |
bsw@1071 | 17 local ldap_conn, err = ldap.bind(dn, password) |
bsw@1071 | 18 |
bsw@1071 | 19 return ldap_conn, err |
bsw@1071 | 20 |
bsw@1071 | 21 end |