annotate mod_lib_ldap.wiki @ 316:03633ab9afb6

Created wiki page through web user interface.
author rdhoelz@gmail.com
date Wed, 05 Dec 2012 11:23:19 +0000
parents
children 629d6b524cb9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
7 == Configuration ==
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
8
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
9 = API =
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
10
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
11 == ldap.getconnection() ==
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
12
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
13 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
14
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
15 == ldap.getparams() ==
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
16
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
17 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
18
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
19 == ldap.bind(username, password) ==
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
20
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
21 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
22
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
23 == ldap.singlematch(query) ==
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
24
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
25 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
26
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
27 == ldap.filter.combine_and(...) ==
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
28
03633ab9afb6 Created wiki page through web user interface.
rdhoelz@gmail.com
parents:
diff changeset
29 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).