Table of Contents
|
LDAP4D at A Dog And His Boy |
LDAP4D - Protocol Messages |
|
|
|
About this section... |
This section describes the methods used to perform the protocol operations specified in RFC 2251 LDAP v3. These methods generate BER encoded text that can be used with LDAP_Message_Send to request an action from an LDAP server. Some aspects of LDAP v3 are not yet implemented. These differences are described in ..... |
LDAP_BindRequest |
||||||||||||||||||||||||||
Syntax: |
result := LDAP_BindRequest (distinguishedName;T ; {password:T }; {version:LI} ) |
|||||||||||||||||||||||||
Description: |
Create a bind message. |
|||||||||||||||||||||||||
Warning: |
none | |||||||||||||||||||||||||
Note: |
If no version parameter is passed, it defaults to version 3. Also, SASL Authentication option is NOT supported. |
|||||||||||||||||||||||||
Params: |
|
|||||||||||||||||||||||||
Example: |
$tText := LDAP_BindRequest($tDN;$tPassword;$iVersion) If ($tText = "") `could check result code also... ALERT("Couldn't create Bind request!") End If |
LDAP_UnbindRequest |
||||||||||||||||
Syntax: |
result:= LDAP_UnbindRequest |
|||||||||||||||
Description: |
Create a unbind message. |
|||||||||||||||
Warning: |
none | |||||||||||||||
Note: |
|
|||||||||||||||
Params: |
|
|||||||||||||||
Example: |
$tText := LDAP_UnbindRequest If ($tText = "") ALERT("Couldn't generate Unbind request!") End If |
LDAP_AbandonRequest |
||||||||||||||||
Syntax: |
result := LDAP_AbandonRequest (messageID:LI) |
|||||||||||||||
Description: |
Create an AbandonRequest. Message should have already been sent to the server. The function of the Abandon Operation is to allow a client to request The MessageID MUST be that of a an operation which was requested (The abandon request itself has its own message id. This is distinct There is no response defined in the Abandon Operation. Upon |
|||||||||||||||
Warning: |
none | |||||||||||||||
Note: |
|
|||||||||||||||
Params: |
|
|||||||||||||||
Example: |
$text :=LDAP_AbandonRequest($iMessageID) If ($tText = "") ALERT("Couldn't create Abandon request!") End IF |
LDAP_AddRequest |
||||||||||||||||||||||||||
Syntax: |
result := LDAP_AddRequest (distinguishedName;T ; pAttributeTypes:P ; pAttributeValues:P ) |
|||||||||||||||||||||||||
Description: |
Create an AddRequest. |
|||||||||||||||||||||||||
Warning: |
Only single attribute values are supported. 2D text array of attribute values required for v20 and higher | |||||||||||||||||||||||||
Note: |
The arrays of attribute types and attribute values must be of the same length. |
|||||||||||||||||||||||||
Params: |
|
Example: |
$tText :=LDAP_AddRequest("uid=tswenson, o=dogboy";->at_attributeArray;->at_attributeValues) If ($tText = "") `could check result code also... ALERT("Couldn't create Add request!") End If |
LDAP_DeleteRequest |
||||||||||||||||
Syntax: |
result := LDAP_DeleteRequest (distinguishedName;T ) |
|||||||||||||||
Description: |
Create a delete request. |
|||||||||||||||
Warning: |
||||||||||||||||
Note: |
|
|||||||||||||||
Params: |
|
|||||||||||||||
Example: |
$tText := LDAP_DeleteRequest($tDN) If ($tText = "") `could check result code also... ALERT("Couldn't create Delete request!") End If |
LDAP_ModifyRequest |
|||||||||||||||||||||||||||||||
Syntax: |
result := LDAP_ModifyRequest (distinguishedName;T ; pAttributeTypes:P ; pAttributeValues:P ; pOperation{optional}:I) |
||||||||||||||||||||||||||||||
Description: |
Create a modify request. |
||||||||||||||||||||||||||||||
Warning: |
Only single attribute values are supported - no 2D arrays! Requires multi value attribute values (2D array) in v20 or greater. |
||||||||||||||||||||||||||||||
Note: |
The arrays must be of the same dimension. |
||||||||||||||||||||||||||||||
Params: |
|
||||||||||||||||||||||||||||||
Example: |
$tText := LDAP_ModifyRequest($tDN;->aT_LocalAttribs;->aT_LocalValues) If ($tText = "") `could check result code also... ALERT("Couldn't create Modify request!") End If |
LDAP_ModifyRDNRequest |
||||||||||||||||||||||||||
Syntax: |
result := LDAP_ModifyRDNRequest (distinguishedName;T ; newRDN:T {; deleteOldRDN:B} ) |
|||||||||||||||||||||||||
Description: |
Create a modify relative distinguished name message. |
|||||||||||||||||||||||||
Warning: |
Only single attribute values are supported. | |||||||||||||||||||||||||
Note: |
Use of this message is dependent upon the schema of the target LDAP server. |
|||||||||||||||||||||||||
Params: |
|
|||||||||||||||||||||||||
Example: |
$tText := LDAP_ModifyRDNRequest($tDN;$tPassword;FALSE) If ($tText = "") `could check result code also... ALERT("Couldn't create Modify RDN request!") End If |
LDAP_CompareRequest |
||||||||||||||||||||||||||
Syntax: |
result := LDAP_CompareRequest (distinguishedName;T ; pAttributeTypes:P ; pAttributeValues:P ) |
|||||||||||||||||||||||||
Description: |
Create a compare message. |
|||||||||||||||||||||||||
Warning: |
only single attribute values are supported. | |||||||||||||||||||||||||
Note: |
|
|||||||||||||||||||||||||
Params: |
|
|||||||||||||||||||||||||
Example: |
$tText := LDAP_CompareRequest($tDN;->tA_AttributeTypes;->tA_AttributeValues) If ($tText = "") `could check result code also... ALERT("Couldn't create Compare request") End If |
LDAP_SearchRequest |
|||||||||||||||||||||||||||||||||||||||||||||||||||
Syntax: |
result := LDAP_SearchRequest (distinguishedName:T; scope:T; derefAliases:T; sizeLimit:T; timeLimit:T; searchFilter:T; pAttributeTypes:P; returnAttributes:B) |
||||||||||||||||||||||||||||||||||||||||||||||||||
Description: |
Create a search request message. |
||||||||||||||||||||||||||||||||||||||||||||||||||
Warning: |
Limitations of search filters are; doesn't handle extensibleMatch until v20 or higher. | ||||||||||||||||||||||||||||||||||||||||||||||||||
Note: |
The response to the search request can be examined using the Response Handling methods ot LDAP4D |
||||||||||||||||||||||||||||||||||||||||||||||||||
Params: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||
Example: |
$tText := LDAP_SearchRequest($tDN;"wholeSubTree";"neverDerefAliases";$iSizeLimit ;$iTimeLimit;$tSearchFilter;->tA_SearchAttributes;False) If ($tText = "") `could check result code also... ALERT("Couldn't create Search request!") End If |
LDAP_AddControl |
|||||||||||||||||||||||||||||||
Syntax: |
result := LDAP_AddControl (pOIDs:P; pCriticalities:P; pControlValues:P; pMessage:P) |
||||||||||||||||||||||||||||||
Description: |
Add a control to an existing LDAP Message that has been created but not yet wrapped in LDAP Message envelope for sending. Since multiple controls can be sent with a single LDAP Message, the paradigm chosen for this API is to pre-assemble the data needed for the controls into arrays and have them constructed into valid BER and added to an existing message using this single command. |
||||||||||||||||||||||||||||||
Warning: |
No checking is done on the passed LDAP message, the conrols are merely added onto the end of the message. The arrays to which pointers are passed must be the same size. If not, the message "LDAP_AddControl : arrays passed as parms don't have same size" will be placed into the LDAD Result error message. |
||||||||||||||||||||||||||||||
Note: |
$tText:=LDAP_Add Control($pOIDs;$pCriticalities;$pControlvalues;$pMessage) |
||||||||||||||||||||||||||||||
Params: |
|
||||||||||||||||||||||||||||||
Example: |
$result := LDAP_AddControl($pOIDs;$pCriticalities;$pControlValues;$pMessage) If ($result # 0) ALERT("Couldn't Add Control to message") End If |