PCSTATS     
[X]   Directory of
Guides & Reviews

Beginners Guides
Motherboards by Brand
Weekly Newsletter
Archived Newsletters

LDAP v3.0
LDAP v3.0 - PCSTATS
An introduction to LDAP, some example code, and a look at the future.
Filed under: Web News Published:  Author: 
External Mfg. Website: PCSTATS Jan 12 2000   J. Kupka  
Home > Reviews > Web News > PCSTATS

Example Code, and a Look to the Future

<HTML>

<HEAD>

<!-- hide the script from old crappy browsers -->

<SCRIPT LANGUAGE="JavaScript">

function entry2str(entry){ var retstr = ""; var attrset = entry.getAttributeSet(); var entrydn = entry.getDN(); var attrsenum = attrset.getAttributes();

retstr = "DN: " + entrydn + "\n";

while (attrsenum.hasMoreElements()) { var attr = attrsenum.nextElement(); var attrname = attr.getName();

if (attrname != "objectClass") { retstr += attrname + ":\n"; var valuesenum = attr.getStringValues();

while (valuesenum.hasMoreElements()) { var strval = valuesenum.nextElement();

if (strval != null) { retstr += " " + strval + "\n"; } }}

}

return(retstr);

}

function ldapisgood(name)

{ var LDAPConnection = netscape.ldap.LDAPConnection; var ld = new LDAPConnection(); var filter = "(cn=" + name + ")";

// request permission from the LDAP server

netscape.security.PrivilegeManager.enablePrivilege("UniversalConnect");

// connect, authenticate to intranet LDAP server that uses an Informix7.2.2 backend

ld.connect("to.mcom.com",389,"","");

var res = ld.search("o=Ace Industry, c=US",

2, filter, null, false);

// search and print results

document.jlkform.jlkdisplay.value = entry2str(res.nextElement());

}</SCRIPT>

</HEAD>

<BODY >

<FORM NAME="jlkform">

<B>Name:</B>

<INPUT NAME="SearchForThis"><br><br>

<INPUT TYPE=BUTTON VALUE="LDAP is Good" onClick="ldapisgood(SearchForThis.value);">

<br><br>Results are below :: =<br>

<TEXTAREA NAME="jlkdisplay" ROWS=8 COLS=50>

</TEXTAREA><center>

</FORM>

</BODY>

</HTML>

The Future

LDAP will likely become widely used to make network administration and the management of directory services and data easier. The big benefit comes from LDAP's ability to access this information from a wide variety of sources, from across small LANs, larger extranets and the Internet. LDAP directories have been used to manage a hundred or more web servers from one location, and to ensure communication and eliminate the need to store redundant information between databases. Businesses will realize that LDAP can do more than simply serve as a phone book for their company's email-and that is can be used as a network wide database.

Think for Yourself

There are three good ways to learn about LDAP:

  • Read Netscape's technical documentation; they had the first LDAP enabled server product on the market
  • Download and play with Netscape's Directory SDK, and learn how to program with it.
  • Read the W3C RFC for LDAPv3.0

Talk About it

Log on to the PCstats BBS and ask questions, post comments and learn more about LDAP.

< Previous Page © 2023 PCSTATS.com Web News Reviews...»

 

Contents of Article: PCSTATS
 Pg 1.  LDAP v3.0
 Pg 2.  — Example Code, and a Look to the Future

 
Hardware Sections 


 
PCSTATS Network Features Information About Us Contact
FrostyTech
PCSTATS Newsletter
Tech Glossary
Technology WebSite Listings
News Archives
(Review RSS Feed)
Site Map
PCstats Wallpaper
About Us
Privacy Policy
Advertise on PCSTATS

How's Our Driving?
© Copyright 1999-2023 www.pcstats.com All rights reserved. Privacy policy and Terms of Use.