class EnsLib.LDAP.Client.Session
extends %RegisteredObject
Ensemble wrapper class for %SYS.LDAP methods to allow creating
a single session instance and used by EnsLib.LDAP.Adapter.Common
property %Attribute
as %Integer [ Transient ];
This holds handle to the current attribute of %Result
property %AttributesAtEnd
as %Boolean [ Transient ];
Indicates if have come to end of the Attributes
property %CurrentDN
as %String(MAXLEN="") [ Transient ];
property %CurrentUser
as %String(MAXLEN="") [ Transient ];
Current user bound as. Either as DN or 'domain\username'
property %Page
as %Integer [ Transient ];
This holds the handle to Page searches - only applies to Windows
property %PageSearchTimeout
as %Numeric(MINVAL=0) [ InitialExpression = 0 ];
Number of seconds to wait on each Page Search attempt - only applies to Windows
property %PageSize
as %Integer [ Transient ];
This holds the current PageSize requested - only applies to Windows
property %PagesAtEnd
as %Boolean [ Transient ];
Indicates if have come to end of the Paged search
property %Result
as %Integer [ Transient ];
This holds handle to the current result of %Results
property %Results
as %Integer [ Transient ];
This holds handle to the current results of the latest invocation of Search
property %ResultsAtEnd
as %Boolean;
Indicates if have come to end of the results
property %Session
as %Integer [ Transient ];
This holds handle to the current LDAP Session
property %startedSSL
as %Boolean [ InitialExpression = 0,Transient ];
Has TLS/SSL started
property LastCall
as %String;
%SYS.LDAP Method
property LastGeneratedStatus
as %Status;
Used to record the generated status
property LastStatusCategory
as %Integer;
Categorization of non success LastStatusCode
property LastStatusCode
as %Integer;
LDAP Status return code.
property LastStatusText
as %String;
LDAP Status return code as Text
method ClearHandles()
method ClearPages()
method ClearResults()
method GetLDAPError(pLastCall As %String = "", pExtraText As %String = "", ByRef pLDAPStatus As %Integer)
as %Status
Get the LDAP Error if pLDAPStatus is not defined
Uses pLDAPStatus and pLastCall string to create an error status
method ldapAddExts(pDN As %String, pAttributeChanges As %List)
as %Status
Add an entry to the LDAP directory tree.
method ldapBinds(pDomainUsername As %String, pDomain As %String, pPassword As %String)
as %Status
Authenticate a Windows client to a Windows Active Directory LDAP Server.
method ldapCompareExts(pDN As %String, pAttribute As %String, pData As %String, Output pComparison As %Boolean)
as %Status
Determine if an attribute, for a given entry, holds a known value.
method ldapConnect(pTimeout As %Integer = 0)
as %Status
Establish a connection to an LDAP server.
Used to force connection from a Windows Client.
method ldapCountEntries(Output pTotal As %Integer)
as %Status
Count the number of entries in current results
method ldapDeleteExts(pDNtoDelete As %String)
as %Status
Delete an entry in the directory tree.
method ldapErr2String(pErrorStatus As %Integer)
as %String
Converts a numeric LDAP error code into a string that describes the error.
method ldapFirstAttribute(Output pAttributeName As %String)
as %Status
Return the first attribute of the current Entry.
method ldapFirstEntry()
as %Status
Return a pointer to the first entry of current results.
method ldapGetDN(Output pDN As %String)
as %Status
Retrieve the distinguished name for current entry.
method ldapGetError()
as %Integer
Retrieve the last error code returned by an LDAP call for a specific session.
method ldapGetNextPages(pSearchTimeout=..%PageSearchTimeout, pPageSize=..%PageSize)
as %Status
Search the LDAP directory using a pages search and return a requested set of attributes for each entry.
The page search timeout and page size specified when issuing SearchInitPage are used if none passed in.
method ldapGetOption(pOption As %String, Output pOutValue As %String)
as %Status
Get options for an LDAP session.
method ldapGetValues(pAttributeName As %String, Output pValue As %List)
as %Status
Return string values for current attribute.
method ldapGetValuesLen(pAttributeName As %String, Output pValue As %List)
as %Status
Return binary value for current attribute.
method ldapInit(pLDAPServer As %String, pLDAPPort As %String, pLDAPSSLPort As %String, pUseSSL As %Boolean = 0, pServerIsWindowsAD As %Boolean = 0)
as %Status
Initialize a connection to a LDAP server.
method ldapModifyExts(pDN As %String, pAttributeChanges As %List)
as %Status
Modify an entry in the directory tree.
method ldapMsgFree()
as %Status
Free the results of the last LDAP SearchExts method call.
method ldapNextAttribute(Output pAttributeName As %String)
as %Status
Return the next attribute of the current Entry.
method ldapNextEntry()
as %Status
Return the next entry of current results.
method ldapRenameExts(pDNtoRename As %String, pNewRDN As %String, pNewParent As %String = "", pDeleteOldDN As %Boolean = 1)
as %Status
Rename the distinguished name of an entry in the directory.
method ldapSASLBinds(ByRef pServerCredentials As %String = "")
as %Status
Authenticate a client to a server, using a SASL EXTERNAL mechanism.
method ldapSearchAbandonPage()
as %Status
Free the page pointer returned by the ldapSearchInitPage
method ldapSearchExts(pBase, pScope, pFilter, pAttrs, pAttributesOnly=0, pSearchTimeout As %Integer = 0, pSizeLimit As %Integer = 0)
as %Status
Search the LDAP directory and return a requested set of attributes for each entry.
Use the same default of 0 for SearchTimeout and SizeLimit
method ldapSearchInitPage(pBase, pScope, pFilter, pAttrs, pAttributesOnly=0, pSearchTimeout=0, pPageSize=0)
as %Status
Search the LDAP directory using a paged search and return a requested set of attributes for each entry.
method ldapSetOption(pOption As %String, pInValue As %String)
as %Status
Set options for an LDAP session.
method ldapSimpleBinds(pDN As %String, pPassword As %String)
as %Status
Authenticate a client to a server, using a plaintext password.
method ldapStartTLSs()
as %Status
Start using TLS encryption on an active LDAP session.
method ldapStopTLSs()
as %Status
Stop using TLS encryption on an active LDAP session.
method ldapUnBinds()
as %Status
End an LDAP session and frees its resources.