From 31fa9d1491199776270611d736658a5e49857a64 Mon Sep 17 00:00:00 2001 From: Andre Carregal Date: Sat, 25 Mar 2006 15:51:04 +0000 Subject: Documentation update - minor details --- lualdap/doc/us/index.html | 12 ++++--- lualdap/doc/us/license.html | 9 +++-- lualdap/doc/us/manual.html | 81 ++++++++++++++++++++------------------------- 3 files changed, 47 insertions(+), 55 deletions(-) diff --git a/lualdap/doc/us/index.html b/lualdap/doc/us/index.html index f1c7626..9795595 100755 --- a/lualdap/doc/us/index.html +++ b/lualdap/doc/us/index.html @@ -91,7 +91,7 @@ LuaForge page.

History

@@ -113,15 +113,17 @@ FINEP.

"mailto:info-NO-SPAM-THANKS@keplerproject.org">contact us. Comments are welcome!

+

You can also reach other Kepler developers and users on the Kepler Project +mailing list.

+
-

Valid XHTML 1.0!

-

- $Id: index.html,v 1.29 2006-03-22 17:12:16 carregal Exp $ -

+

+ Valid XHTML 1.0!

+

$Id: index.html,v 1.30 2006-03-25 15:51:04 carregal Exp $

diff --git a/lualdap/doc/us/license.html b/lualdap/doc/us/license.html index 58f4239..aff292f 100755 --- a/lualdap/doc/us/license.html +++ b/lualdap/doc/us/license.html @@ -77,7 +77,7 @@ The implementation is not derived from licensed software.


-Copyright © 2003-2005 The Kepler Project. +Copyright © 2003-2006 The Kepler Project.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation @@ -104,10 +104,9 @@ SOFTWARE.

-

Valid XHTML 1.0!

-

- $Id: license.html,v 1.7 2005-05-23 18:27:11 carregal Exp $ -

+

+ Valid XHTML 1.0!

+

$Id: license.html,v 1.8 2006-03-25 15:51:04 carregal Exp $

diff --git a/lualdap/doc/us/manual.html b/lualdap/doc/us/manual.html index 2bff17c..d4bcadc 100755 --- a/lualdap/doc/us/manual.html +++ b/lualdap/doc/us/manual.html @@ -54,9 +54,9 @@

Introduction

-

LuaLDAP is a simple interface from Lua to an LDAP client (in +

LuaLDAP is a simple interface from Lua to an LDAP client, in fact it is a bind to OpenLDAP -client).

+client.

LuaLDAP defines one single global variable: a table called lualdap. This table holds the functions used to create an @@ -70,17 +70,12 @@ tables; attributes are its fields. The attribute values can be strings or tables of strings (used to represent multiple values).

-

LuaLDAP is a bind to the OpenLDAP library, therefore it +

LuaLDAP is a bind to the +OpenLDAP library and it depends on a previous installation of this library. You can -download OpenLDAP from the OpenLDAP download -page.

- -

LuaLDAP source consists in a single C source file. -The distribution provides a Makefile prepared to -compile the library and install it. The file config should -be edited to suit the needs of the aimed platform.

+download OpenLDAP from the +OpenLDAP download +page.

Installation

@@ -89,10 +84,10 @@ be edited to suit the needs of the aimed platform.

for Lua 5.1, therefore it should be "installed". Refer to Compat-5.1 configuration section about how to install the compiled -binary properly. -The compiled binary should be copied to a directory in your LUA_CPATH.

+binary properly. The compiled binary should be copied to a directory in your +LUA_CPATH.

-

Windows users can use the pre-compiled versions of LuaLDAP +

Windows users can use the binary versions of LuaLDAP (lualdap.dll) and OpenLDAP (libsasl.dll) available at LuaForge.

@@ -100,14 +95,12 @@ The compiled binary should be copied to a directory in your LUA_CPATH.

Representing attributes

Many LDAP operations manage sets of attributes and values. -LuaLDAP provides a uniform way of representing them: using Lua -tables. A table of attributes is indexed by the name of the -attribute and its value can be a string (be careful: it can also be -a "binary string") or a list/table of values indexed by numbers -from 1 to n. Some operations have different approaches -that will be explained when necessary.

+LuaLDAP provides a uniform way of representing them by using Lua +tables. The table attributes can be Lua string, a binary string (a string of +bits), or table of n values indexed from 1 to n. +Some operations have different approaches that will be explained as necessary.

-

Follows a small example:

+

Here is a simple example:

 entry = {
@@ -119,7 +112,7 @@ entry = {
 }
 
-Attribute names cannot contain zeroes ('\0') +Attribute names cannot contain the '\0' character.

Distinguished names

@@ -131,7 +124,7 @@ to represent the DN of any entry.

A more precise definition can be found on the LDAP documentation. A list of some of these files can be found in -section Related documentation.

+Related documentation section.

Initialization functions

@@ -152,29 +145,29 @@ section Related documentation.

password. The optional argument usetls is a Boolean flag indicating if Transport Layer Security (TLS) should be used.
- Returns a connection object or nil followed by an error - string. + Returns a connection object if the operation was successful. In case of + error it returns nil followed by an error string.

Connection objects

A connection object offers methods which implement LDAP -operations. Almost all of them need a distinguished -name to identify the entry on which the operation will be -executed.

+operations. Almost all of them need a +distinguished name to identify the entry on which the +operation will be executed.

These methods execute asynchronous operations and return a -function that should be called to obtain the result(s). These -functions will return true indicating success of the -operation; the only exception is the function compare +function that should be called to obtain the results. The called +functions will return true indicating the success of the +operation. The only exception is the compare function which can return either true or false -(which is the result of the comparison) on a successful operation.

+(as the result of the comparison) on a successful operation.

There are two types of errors: API errors, such as wrong parameters, absent connection etc.; and LDAP errors, -such as mal-formed DN, unknown attribute etc. API errors will raise +such as malformed DN, unknown attribute etc. API errors will raise a Lua error, while LDAP errors will be reported by the -function/method returning nil followed by the error +function/method returning nil plus the error message provided by the OpenLDAP client.

A connection object can be created by calling the

conn:compare (distinguished_name, attribute, value)
-
Compares a value against an entry.
+
Compares a value to an entry.
conn:delete (distinguished_name)
Deletes an entry from the directory.
conn:modify (distinguished_name, table_of_operations*)
-
Changes values of attributes in the given entry. The tables of - operations are table of attributes but +
Changes the values of attributes in the given entry. The tables of + operations are tables of attributes with the value on index 1 indicating the operation to be performed. The valid operations are: - All tables of operations given as arguments will be joined together - to perform a single LDAP modify operation.
+ Any number of tables of operations will be used in a single LDAP modify + operation.
conn:rename (distinguished_name, new_relative_dn, new_parent)
-
Changes entry names (i.e. change its distinguished - name).
+
Changes an entry name (i.e. change its distinguished name).
conn:search (table_of_search_parameters)
Performs a search operation on the directory. The parameters are @@ -263,8 +255,7 @@ message provided by the OpenLDAP client.

Example

-

Below is a small sample code displaying the basic use of the -library.

+

here is a some sample code that demonstrate the basic use of the library.

 require "lualdap"
@@ -331,7 +322,7 @@ ld:delete ("mydn=newuser,ou=people,dc=ldp,dc=world")()
 

Valid XHTML 1.0!

- $Id: manual.html,v 1.28 2006-03-22 17:12:16 carregal Exp $ + $Id: manual.html,v 1.29 2006-03-25 15:51:04 carregal Exp $

-- cgit v1.2.3-59-g8ed1b