Skip to main content

%Net.LDAP.Client.Session

class %Net.LDAP.Client.Session extends %Library.RegisteredObject

WARNING: This class and its methods are all deprecated; please use %SYS.LDAP class instead.

Property Inventory

Method Inventory

Properties

property MaxItems as %Integer;
Size limit
Property methods: MaxItemsDisplayToLogical(), MaxItemsGet(), MaxItemsIsValid(), MaxItemsLogicalToDisplay(), MaxItemsNormalize(), MaxItemsSet()
property Referrals as %Integer;
If set indicates that LDAP should chase referrals/references returned in a search
Property methods: ReferralsDisplayToLogical(), ReferralsGet(), ReferralsIsValid(), ReferralsLogicalToDisplay(), ReferralsNormalize(), ReferralsSet()
property SearchAttrsOnly as %Integer;
Search attributes only (Return no value)
Property methods: SearchAttrsOnlyDisplayToLogical(), SearchAttrsOnlyGet(), SearchAttrsOnlyIsValid(), SearchAttrsOnlyLogicalToDisplay(), SearchAttrsOnlyNormalize(), SearchAttrsOnlySet()

Methods

method AddNewEntry(DN As %String, attribs As %Net.LDAP.Client.PropList) as %Status
Create a new entry
method CompareEntryValue(DN As %String, Attrib As %String, Value As %RawString, Binary As %Boolean = 0) as %Boolean
Comapre an entry attribute value

DN Distinguished Name of the entry.

Attrib Attribute to compare its value.

Value The value to compare with.

Binary True if the value is binary.

method Connect(Server As %String = "127.0.0.1", port As %Integer = 0, UserName As %String = "", Password As %String = "", UseSSL As %Boolean = 0) as %Status
Establish connection to a LDAP server. You have to connect first before invoking other methods.
method DeleteEntry(DN As %String) as %Status
Delete an entry
method EditEntry(DN As %String) as %Net.LDAP.Client.EditEntry
Edit/Modify current entry attributes.

Returns EditEntry object, use the returned object to modify the attributes

method GetPropList() as %Net.LDAP.Client.PropList
Return a new prop list object. Used to maintain attribute and value pairs.See %Net.LDAP.Client.PropList object.
method GetStringList() as %Net.LDAP.Client.PropList
Return a new StringList list object. Used to maintain a list of strings i.e. list of attributes.
method GetValueList(binary As %Boolean = 0) as %Net.LDAP.Client.ValueList
Return a new value list object. Value list is used to associate multiple values with an attribute. See %Net.LDAP.Client.ValueList Object.
method RenameEntry(DN As %String, NewRDN As %String, NewParent As %String = "", DelOldRDN As %Boolean = 0) as %Status
Rename an entry

DN Distinguished Name of the entry

NewRDN New Relative Distinguished Name to assign to the entry

NewParent DN of the new parent to move the entry under. Pass "" if you do not want to move the entry to a different location.

DelOldRDN If 0, the old RDN is retained as an attribute in the modified entry

method SASLConnect(Server As %String = "127.0.0.1", port As %Integer = 0, DistinguishedName As %String = "", AuthMechanism As %String, Credentials As %String, ByRef ServerData As %String) as %Status
Authenticates client to an LDAP server using a SASL (Simple Authentication and Security Layer) mechanism. (see RFC2222).Opens in a new tab

Note: The LDAP server must support that SASL mechanism for authentication.

You have to connect first before invoking any methods.

If the server sends a challenge to your client, check the ServerData argument for the server's challenge. Call the SASLConnect() method again to send a response to that challenge.

Example:

set comp=SASLConnect("localhost",0,"uid=u123,ou=people,o=isctest.com","abcMechanism","secret",srvData)

write:(comp=$$$OK) "Server credential is : ",srvData,!

Search LDAP DB base: search base

scope: 0==search base, 1==search one level, 2==search subtree

filter: the search criteria (see RFC2254).Opens in a new tab

attrs: list of attributes to return per found entry.

If search fails the returned value is $$$ISERR

Inherited Members

Inherited Methods

FeedbackOpens in a new tab