liquid_feedback_frontend
view env/ldap/bind_as_app.lua @ 1636:8e4fed876772
Bugfix for nattrs > 1
| author | bsw | 
|---|---|
| date | Mon Feb 08 22:22:53 2021 +0100 (2021-02-08) | 
| parents | 58f48a8a202a | 
| children | 
 line source
     1 -- binds to configured LDAP server with application's credentials
     2 -- --------------------------------------------------------------------------
     3 --
     4 -- returns
     5 --   ldap_conn: in case of success, an LDAP connection handle
     6 --   err: in case of an error, an error code (string)
     8 function ldap.bind_as_app()
    10   local dn, password
    12   if config.ldap.bind_as then
    13     dn       = config.ldap.bind_as.dn
    14     password = config.ldap.bind_as.password
    15   end
    17   local ldap_conn, err = ldap.bind(dn, password)
    19   return ldap_conn, err
    21 end
