100 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
		
		
			
		
	
	
			100 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			HTML
		
	
	
	
|  | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
|  | <html> | ||
|  | <head> | ||
|  |   <meta content="text/html; charset=ISO-8859-15" | ||
|  |  http-equiv="content-type"> | ||
|  |   <title>ldap.inc</title> | ||
|  |   <link rel="stylesheet" type="text/css" href="style/layout.css"> | ||
|  | </head> | ||
|  | <body> | ||
|  | 
 | ||
|  | <p align="center"> | ||
|  | <script type="text/javascript"><!-- | ||
|  | google_ad_client = "pub-4179059556107138"; | ||
|  | google_alternate_ad_url = "http://lam.sourceforge.net/google_adsense_script.html"; | ||
|  | google_ad_width = 728; | ||
|  | google_ad_height = 90; | ||
|  | google_ad_format = "728x90_as"; | ||
|  | google_ad_type = "text_image"; | ||
|  | google_ad_channel =""; | ||
|  | google_page_url = document.location; | ||
|  | google_color_border = "EEEEEE"; | ||
|  | google_color_bg = "FFFFFF"; | ||
|  | google_color_link = "0000FF"; | ||
|  | google_color_url = "008000"; | ||
|  | google_color_text = "000000"; | ||
|  | //--></script> | ||
|  | <script type="text/javascript" | ||
|  |   src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> | ||
|  | </script> | ||
|  | </p> | ||
|  | 
 | ||
|  | 
 | ||
|  | <h1 style="text-align: center;">ldap.inc</h1> | ||
|  | <br> | ||
|  | <br> | ||
|  | This library provides the access to the LDAP server and its content.<br> | ||
|  | The <span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']</span> | ||
|  | object reconnects automatically to the LDAP server on every page load.<br> | ||
|  | <br> | ||
|  | <br> | ||
|  | <h2>1. Server handle</h2> | ||
|  | All PHP functions which access LDAP require a server handle as | ||
|  | parameter. This is managed by ldap.inc.<br> | ||
|  | You can access it with <span | ||
|  |  style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->server</span>.<br> | ||
|  | <br> | ||
|  | <br> | ||
|  | <h2>2. Object classes</h2> | ||
|  | Account modules may want to check if the current LDAP server supports | ||
|  | all required object classes.<br> | ||
|  | <span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->objectClasses | ||
|  | </span>contains a list of object classes and their attributes which is | ||
|  | read from the LDAP server.<br> | ||
|  | <br> | ||
|  | <br> | ||
|  | <h2>3. En-/Decryption</h2> | ||
|  | For security reasons sensitive data like user passwords should be | ||
|  | encrypted before storing in session.<br> | ||
|  | <span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->encrypt(<string>)</span> | ||
|  | encrypts a string and returns a binary object. This can be decrypted | ||
|  | with <span style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->decrypt(<object>)</span><br> | ||
|  | <br> | ||
|  | Ldap.inc will take care for the crypotographic key.<br> | ||
|  | <br> | ||
|  | <br> | ||
|  | <h2>4. Random values</h2> | ||
|  | Ldap.inc contains a random integer value which is much more secure than | ||
|  | calling <span style="font-style: italic;">mt_rand()</span>. The value | ||
|  | changes on every page load and is accessible in <span | ||
|  |  style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->rand</span><span | ||
|  |  style="font-style: italic;">.</span><br> | ||
|  | If you need multiple values you can get a new value by calling <span | ||
|  |  style="font-weight: bold; font-style: italic;">$_SESSION['ldap']->new_rand()</span><span | ||
|  |  style="font-style: italic;">.</span><br> | ||
|  | <br> | ||
|  | 
 | ||
|  | <p align="center"> | ||
|  | <script type="text/javascript"><!-- | ||
|  | google_ad_client = "pub-4179059556107138"; | ||
|  | google_alternate_ad_url = "http://lam.sourceforge.net/google_adsense_script.html"; | ||
|  | google_ad_width = 728; | ||
|  | google_ad_height = 90; | ||
|  | google_ad_format = "728x90_as"; | ||
|  | google_ad_type = "text_image"; | ||
|  | google_ad_channel =""; | ||
|  | google_page_url = document.location; | ||
|  | google_color_border = "EEEEEE"; | ||
|  | google_color_bg = "FFFFFF"; | ||
|  | google_color_link = "0000FF"; | ||
|  | google_color_url = "008000"; | ||
|  | google_color_text = "000000"; | ||
|  | //--></script> | ||
|  | <script type="text/javascript" | ||
|  |   src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> | ||
|  | </script> | ||
|  | </p> | ||
|  | 
 | ||
|  | </body> | ||
|  | </html> |