Mercurial > prosody-wiki
annotate mod_lib_ldap.wiki @ 386:46342407997c
Add Deprecated tag, no longer supported
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 13 Jul 2013 17:40:52 +0200 |
parents | 629d6b524cb9 |
children |
rev | line source |
---|---|
316
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
1 #summary Library module for LDAP |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
2 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
3 = Introduction = |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
4 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
5 This module is used by other modules to access an LDAP server. It's pretty useless on its own; you should use it if you want to write your own LDAP-related module, or if you want to use one of mine ([mod_auth_ldap2], [mod_storage_ldap]). |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
6 |
317
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
7 = Installation = |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
8 |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
9 Simply copy ldap.lib.lua into your Prosody installation's plugins directory. |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
10 |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
11 = Configuration = |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
12 |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
13 Configuration for this module (and all modules that use it) goes into the _ldap_ section of your prosody.cfg.lua file. Each plugin that uses it may add their own sections; this plugin relies on the following keys: |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
14 |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
15 * hostname - Where your LDAP server is located |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
16 * bind_dn - The DN to perform queries as |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
17 * bind_password - The password to use for queries |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
18 * use_tls - Whether or not TLS should be used to connect to the LDAP server |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
19 * user.usernamefield - The LDAP field that contains a user's username |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
20 * user.basedn - The base DN for user records |
316
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
21 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
22 = API = |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
23 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
24 == ldap.getconnection() == |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
25 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
26 Returns an LDAP connection object corresponding to the configuration in prosody.cfg.lua. The connection object is a [http://www.keplerproject.org/lualdap/ LuaLDAP] connection. |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
27 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
28 == ldap.getparams() == |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
29 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
30 Returns the LDAP configuration provided in prosody.cfg.lua. Use this if you want to stick some configuration information for your module into the LDAP section in the configuration file. |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
31 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
32 == ldap.bind(username, password) == |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
33 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
34 Verifies that _username_ and _password_ bind ok. *NOTE*: This does not bind the current LDAP connection to the given username! |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
35 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
36 == ldap.singlematch(query) == |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
37 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
38 Used to fetch a single LDAP record given an LDAP query. A convenience function. |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
39 |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
40 == ldap.filter.combine_and(...) == |
03633ab9afb6
Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff
changeset
|
41 |
317
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
42 Takes a list of LDAP filter expressions and returns a filter expression that results in the intersection of each given expression (it ANDs them together). |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
43 |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
44 = More Information = |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
45 |
629d6b524cb9
Edited wiki page mod_lib_ldap through web user interface.
rdhoelz@gmail.com
parents:
316
diff
changeset
|
46 For more information, please consult the README.md file under prosody-modules/mod_lib_ldap. |