comparison mod_lib_ldap/README.markdown @ 1803:4d73a1a6ba68

Convert all wiki pages to Markdown
author Kim Alvefur <zash@zash.se>
date Fri, 28 Aug 2015 18:03:58 +0200
parents mod_lib_ldap/README.wiki@29f3d6b7ad16
children 79b9bd84b91c
comparison
equal deleted inserted replaced
1802:0ab737feada6 1803:4d73a1a6ba68
1 ---
2 labels:
3 summary: Library module for LDAP
4 ...
5
6 Introduction
7 ============
8
9 This module is used by other modules to access an LDAP server. It's
10 pretty useless on its own; you should use it if you want to write your
11 own LDAP-related module, or if you want to use one of mine
12 ([mod\_auth\_ldap2](mod_auth_ldap2.md),
13 [mod\_storage\_ldap](mod_storage_ldap.md)).
14
15 Installation
16 ============
17
18 Simply copy ldap.lib.lua into your Prosody installation's plugins
19 directory.
20
21 Configuration
22 =============
23
24 Configuration for this module (and all modules that use it) goes into
25 the *ldap* section of your prosody.cfg.lua file. Each plugin that uses
26 it may add their own sections; this plugin relies on the following keys:
27
28 - hostname - Where your LDAP server is located
29 - bind\_dn - The DN to perform queries as
30 - bind\_password - The password to use for queries
31 - use\_tls - Whether or not TLS should be used to connect to the LDAP
32 server
33 - user.usernamefield - The LDAP field that contains a user's username
34 - user.basedn - The base DN for user records
35
36 API
37 ===
38
39 ldap.getconnection()
40 --------------------
41
42 Returns an LDAP connection object corresponding to the configuration in
43 prosody.cfg.lua. The connection object is a
44 [LuaLDAP](http://www.keplerproject.org/lualdap/) connection.
45
46 ldap.getparams()
47 ----------------
48
49 Returns the LDAP configuration provided in prosody.cfg.lua. Use this if
50 you want to stick some configuration information for your module into
51 the LDAP section in the configuration file.
52
53 ldap.bind(username, password)
54 -----------------------------
55
56 Verifies that *username* and *password* bind ok. **NOTE**: This does not
57 bind the current LDAP connection to the given username!
58
59 ldap.singlematch(query)
60 -----------------------
61
62 Used to fetch a single LDAP record given an LDAP query. A convenience
63 function.
64
65 ldap.filter.combine\_and(...)
66 -----------------------------
67
68 Takes a list of LDAP filter expressions and returns a filter expression
69 that results in the intersection of each given expression (it ANDs them
70 together).
71
72 More Information
73 ================
74
75 For more information, please consult the README.md file under
76 prosody-modules/mod\_lib\_ldap.