From 32e319da6a474c5db8f2513210e27570f8b9aeec Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Sat, 11 Sep 2004 16:44:16 +0000 Subject: [PATCH] added ldap.inc --- lam/docs/devel/index.htm | 87 ++++++++++++++++++++++++++++++---------- lam/docs/devel/ldap.htm | 55 +++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 21 deletions(-) create mode 100644 lam/docs/devel/ldap.htm diff --git a/lam/docs/devel/index.htm b/lam/docs/devel/index.htm index d7783475..2c304f5c 100644 --- a/lam/docs/devel/index.htm +++ b/lam/docs/devel/index.htm @@ -9,28 +9,73 @@

LDAP Account Manager - Code overview

overview
-
-

Web pages:

-
-

Libraries:

- +
+ + + + + + + + +
+

Web pages:

+
    +
  • Login
    +
  • +
  • Configuration
  • +
  • Account +lists
    +
  • +
  • Account pages
  • +
  • Tools
  • +
      +
    • Profile editor
    • +
    • Samba 3 domains
    • +
    • File upload
    • +
    • OU editor
    • +
    • PDF editor
      +
    • +
    +
+
+

Libraries:

+
    +
  • Account modules (modules.inc)
    +
  • +
  • PDF (pdf.inc)
    +
  • +
  • Account profiles (profiles.inc)
    +
  • +
  • Configuration (config inc)
    +
  • +
  • LDAP +(ldap.inc)
    +
  • +
  • other libraries
  • +
      +
    • Blowfish
    • +
    • Cache
    • +
    • Lists
    • +
    • Status messages
      +
    • +
    +
+
+

Configuration files:

+
    +
  • Base module
    +
  • +
  • Account modules
  • +
  • PDF templates
  • +
  • Account profiles
  • +
  • Configuration profiles
    +
  • +
+
+
diff --git a/lam/docs/devel/ldap.htm b/lam/docs/devel/ldap.htm new file mode 100644 index 00000000..28e1beeb --- /dev/null +++ b/lam/docs/devel/ldap.htm @@ -0,0 +1,55 @@ + + + + + ldap.inc + + + +

ldap.inc

+
+
+This library provides the access to the LDAP server and its content.
+The $_SESSION['ldap'] +object reconnects automatically to the LDAP server on every page load.
+
+
+

1. Server handle

+All PHP functions which access LDAP require a server handle as +parameter. This is managed by ldap.inc.
+You can access it with $_SESSION['ldap']->server.
+
+
+

2. Object classes

+Account modules may want to check if the current LDAP server supports +all required object classes.
+$_SESSION['ldap']->objectClasses +contains a list of object classes and their attributes which is +read from the LDAP server.
+
+
+

3. En-/Decryption

+For security reasons sensitive data like user passwords should be +encrypted before storing in session.
+$_SESSION['ldap']->encrypt(<string>) +encrypts a string and returns a binary object. This can be decrypted +with $_SESSION['ldap']->decrypt(<object>)
+
+Ldap.inc will take care for the crypotographic key and if Blowfish or +MCrypt/AES is used.
+
+
+

4. Random values

+Ldap.inc contains a random integer value which is much more secure than +calling mt_rand(). The value +changes on every page load and is accessible in $_SESSION['ldap']->rand.
+If you need multiple values you can get a new value by calling $_SESSION['ldap']->new_rand().
+
+ +