Debian Codegraph @

docs/devel/ldap.htm

raw symbols SCIP
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html lang="en">
3 <head>
4 <meta content="text/html; charset=ISO-8859-15"
5 http-equiv="content-type">
6 <title>ldap.inc</title>
7 <link rel="stylesheet" type="text/css" href="style/layout.css">
8 <link rel="shortcut icon" type="image/x-icon" href="images/favicon.ico">
9 </head>
10 <body>
11 <h1 style="text-align: center;">ldap.inc</h1>
12 <br>
13 <br>
14 This library provides the access to the LDAP server and its content.<br>
15 The <span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']</span>
16 object reconnects automatically to the LDAP server on every page load.<br>
17 <br>
18 <br>
19 <h2>1. Server handle</h2>
20 All PHP functions which access LDAP require a server handle as
21 parameter. This is managed by ldap.inc.<br>
22 You can access it with <span
23 style="font-weight: bold; font-style: italic;">$_SESSION['ldap']-&gt;server</span>.<br>
24 <br>
25 <br>
26 <h2>2. Object classes</h2>
27 Account modules may want to check if the current LDAP server supports
28 all required object classes.<br>
29 <span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']-&gt;objectClasses
30 </span>contains a list of object classes and their attributes which is
31 read from the LDAP server.<br>
32 <br>
33 <br>
34 <h2>3. En-/Decryption</h2>
35 For security reasons sensitive data like user passwords should be
36 encrypted before storing in session.<br>
37 <span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']-&gt;encrypt(&lt;string&gt;)</span>
38 encrypts a string and returns a binary object. This can be decrypted
39 with <span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']-&gt;decrypt(&lt;object&gt;)</span><br>
40 <br>
41 Ldap.inc will take care for the crypotographic key.<br>
42 <br>
43 <br>
44 <h2>4. Random values</h2>
45 Ldap.inc contains a random integer value which is much more secure than
46 calling <span style="font-style: italic;">mt_rand()</span>. The value
47 changes on every page load and is accessible in <span
48 style="font-weight: bold; font-style: italic;">$_SESSION['ldap']-&gt;rand</span><span
49 style="font-style: italic;">.</span><br>
50 If you need multiple values you can get a new value by calling <span
51 style="font-weight: bold; font-style: italic;">$_SESSION['ldap']-&gt;new_rand()</span><span
52 style="font-style: italic;">.</span><br>
53 <br>
54 </body>
55 </html>