Class Reference
IRIS for UNIX 2024.1.2
InterSystems: The power behind what matters   
Documentation  Search
  [USER] >  [%Net] >  [LDAP] >  [Client] >  [Session]
Private  Storage   

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

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

Inventory

Parameters Properties Methods Queries Indices ForeignKeys Triggers
36 24


Summary

Properties
MaxItems Referrals SearchAttrsOnly

Methods
%AddToSaveSet %ClassIsLatestVersion %ClassName %ConstructClone
%DispatchClassMethod %DispatchGetModified %DispatchGetProperty %DispatchMethod
%DispatchSetModified %DispatchSetMultidimProperty %DispatchSetProperty %Extends
%GetParameter %IsA %IsModified %New
%NormalizeObject %ObjectModified %OriginalNamespace %PackageName
%RemoveFromSaveSet %SerializeObject %SetModified %ValidateObject
AddNewEntry CompareEntryValue Connect DeleteEntry
EditEntry GetPropList GetStringList GetValueList
RenameEntry SASLConnect Search


Properties

• property MaxItems as %Integer;
Size limit
• property Referrals as %Integer;
If set indicates that LDAP should chase referrals/references returned in a search
• property SearchAttrsOnly as %Integer;
Search attributes only (Return no value)

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).

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,!

• method Search(base As %String, scope As %Net.LDAP.Client.Search.Scope = 2, filter As %String, attrs As %Net.LDAP.Client.StringList = "", timeout As %Integer = 10000) as %Net.LDAP.Client.Entries
Search LDAP DB base: search base

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

filter: the search criteria (see RFC2254).

attrs: list of attributes to return per found entry.

If search fails the returned value is $$$ISERR


Copyright (c) 2025 by InterSystems Corporation. Cambridge, Massachusetts, U.S.A. All rights reserved. Confidential property of InterSystems Corporation.