LDAPMBS class
Online Documentation - Statistics - FAQ - Plugin Parts (All , Dependencies ) - Class hierarchy
New in Version
22.2
22.3
22.4
22.5
23.0
23.1
23.2
23.3
23.4
23.5
24.0
24.1
The list of the topics ,
classes ,
interfaces ,
controls ,
modules ,
global methods by category ,
global methods by name ,
screenshots ,
licenses
and examples .
Platforms to show: All Mac Windows Linux Cross-Platform
LDAPMBS class
The class for LDAP connection.
Example
// Get a handle to an LDAP connection and set any session preferences. dim l as new LDAPMBS("localhost" , 389 )// Use the ProtocolVersion session preference to specify that the client is an LDAPv3 client. l.ProtocolVersion = 3 if l.Lasterror <> 0 then dim error as string = l.ErrorString(l.Lasterror) Breakend if // Bind to the server. // In this example, the client binds anonymously to the server // (no DN or credentials are specified). l.SimpleBind("" , "" )if l.Lasterror <> 0 then dim error as string = l.ErrorString(l.Lasterror) Breakend if const BASEDN = "dc=example,dc=com" const SCOPE = l.kScopeSubtreeconst FILTER = "(sn=Jensen)" dim results() as Dictionary = l.Search(BASEDN, SCOPE, FILTER)for each dic as Dictionary in results Break // look in debugger next
On Windows we use Microsoft's WinLDAP Library.
For Mac OS X and Linux we link to OpenLDAP, so be sure to have the right package installed on Linux.
event Error (ErrorCode as Integer, ErrorMessage as String, FunctionName as String)
7 properties
13 methods
method Add (distinguishedName as string, attrs() as LDAPModMBS )
method Bind (Who as String, Cred as String, AuthMethod as Integer, Domain as String = "")
method Connect (TimeOutSeconds as Double = 1.0)
method Constructor
method Constructor (IP as string, Port as Integer, Open as Boolean = false, Secure as Boolean = false)
method Constructor (URL as string)
method Delete (distinguishedName as string)
method Modify (distinguishedName as string, attrs() as LDAPModMBS )
method Rename (distinguishedName as string, NewDistinguishedName as String, DeleteOldRdn as Boolean)
method Rename (distinguishedName as string, NewRDN as String, NewParent as String, DeleteOldRdn as Boolean)
method Search (distinguishedName as string, Scope as Integer, Filter as String, Attrs() as String = nil, AttributesOnly as boolean = false, timeout as Double = 1.0, SizeLimit as Integer = 0) as Dictionary()
method SimpleBind (Who as String, Cred as String)
method StartTLS
shared method ErrorString (error as Integer) as string
24 constants
Auth Modes
Constant
Value
Description
kAuthDigest
&h4086
Only for Windows.
kAuthDPA
&h2086
Only for Windows.
kAuthExternal
&hA6
kAuthKRBV4
&hFF
Only for Mac OS X and Linux.
kAuthKRBV41
&h81
Only for Mac OS X and Linux.
kAuthKRBV42
&h82
Only for Mac OS X and Linux.
kAuthMSN
&h0886
Only for Windows.
kAuthNegotiate
&h4FF
Only for Windows.
kAuthNegotiateWin
&h0486
Only for Windows.
kAuthNone
0
No auth.
kAuthNTLM
&h1086
Only for Windows.
kAuthSASL
&hA3
Only for Mac OS X and Linux.
kAuthSASLWin
&h83
Only for Windows.
kAuthSicily
&h0286
Only for Windows.
kAuthSimple
&h80
Simple authentication.
kAuthSSPI
&h4FF
Only for Windows.
Scopes
Constant
Value
Description
kScopeBase
0
kScopeDefault
-1
kScopeOneLevel
1
kScopeSubordinate
3
kScopeSubtree
2
Versions
Constant
Value
Description
kVersion1
1
kVersion2
2
kVersion3
3
This class has no sub classes.
Some examples using this class:
Blog Entries
Xojo Developer Magazine
Release notes
Version 20.2
Changed LDAPMBS class to load ldap library on runtime for Linux and MacOS.
Version 20.1
Fixed LDAPMBS class to load LDAP framework earlier.
Version 19.4
Added CACertFile property for LDAPMBS class.
Version 19.3
Added StartTLS method to LDAPMBS class.
Version 19.2
Changed NetworkTimeOut and TimeOut in LDAPMBS class to be double value with seconds.
Version 18.5
Changed how timeout is passed to LDAPMBS .Search function.
Version 17.1
Fixed issue with LDAPMBS .Bind not working correctly on Windows for all auth methods.
The items on this page are in the following plugins: MBS Network Plugin .
LCMS2ViewingConditionsMBS
-
LDAPModMBS