Myna.Ldap

Represents a connection to an LDAP server

Summary
Myna.LdapRepresents a connection to an LDAP server
Functions
LdapContructs a new Ldap connection
searchSearches an LDAP repository

Functions

Ldap

Myna.Ldap = function(server,
username,
password,
acceptSelfSignedCerts)

Contructs a new Ldap connection

Parameters

serverREQUIRED Server and initial subtree to connect to.
ldap://server.yourdomain.com:389/o=top,ou=people
ldaps://server.yourdomain.com:636/o=top,ou=people
usernameOptional default null* Fully qualified username to log in as
cn=name,ou=department,o=ldap_root
passwordOptional default null password for user
acceptSelfSignedCertsOptional default true By default secure ldap connections will accept self-signed certs.  Set this to false to throw an exception.

search

Myna.Ldap.prototype.search=function(searchString,
attributes)

Searches an LDAP repository

Parameters

searchStringREQUIRED search to perform
(cn=mporter)
(&(orgcode=01018346)(positioncode=80569))
attributesOptional default null a comma separated list of attributes to retrieve from the ldap server.  If not specified, all attributes are returned Returns: An array of ldap results that looks like this
result = (Array)
|
+--[0] = (Object)
|
+-- name = (String) fully qualified name of result node
|
+-- attributes = (Object)
|
+--<attribute name> = (Array)
|
+--[0] = (String)
Myna.Ldap = function(server,
username,
password,
acceptSelfSignedCerts)
Contructs a new Ldap connection
Myna.Ldap.prototype.search=function(searchString,
attributes)
Searches an LDAP repository