Class TLDAPSend

DescriptionHierarchyFieldsMethodsProperties

Unit

Declaration

type TLDAPSend = class(TSynaClient)

Description

Implementation of LDAP client

(version 2 and 3)

Note: Are you missing properties for setting Username and Password? Look to parent TSynaClient object!

Are you missing properties for specify server address and port? Look to parent TSynaClient too!

Hierarchy

Overview

Methods

Public constructor Create;
Public destructor Destroy; override;
Public function Login: Boolean;
Public function Bind: Boolean;
Public function BindSasl: Boolean;
Public function Logout: Boolean;
Public function Modify(obj: AnsiString; Op: TLDAPModifyOp; const Value: TLDAPAttribute): Boolean;
Public function Add(obj: AnsiString; const Value: TLDAPAttributeList): Boolean;
Public function Delete(obj: AnsiString): Boolean;
Public function ModifyDN(obj, newRDN, newSuperior: AnsiString; DeleteoldRDN: Boolean): Boolean;
Public function Compare(obj, AttributeValue: AnsiString): Boolean;
Public function Search(obj: AnsiString; TypesOnly: Boolean; Filter: AnsiString; const Attributes: TStrings): Boolean;
Public function Extended(const Name, Value: AnsiString): Boolean;
Public function StartTLS: Boolean;

Properties

Published property Version: integer read FVersion Write FVersion;
Published property ResultCode: Integer read FResultCode;
Published property ResultString: AnsiString read FResultString;
Published property FullResult: AnsiString read FFullResult;
Published property AutoTLS: Boolean read FAutoTLS Write FAutoTLS;
Published property FullSSL: Boolean read FFullSSL Write FFullSSL;
Published property Seq: integer read FSeq;
Published property SearchScope: TLDAPSearchScope read FSearchScope Write FSearchScope;
Published property SearchAliases: TLDAPSearchAliases read FSearchAliases Write FSearchAliases;
Published property SearchSizeLimit: integer read FSearchSizeLimit Write FSearchSizeLimit;
Published property SearchTimeLimit: integer read FSearchTimeLimit Write FSearchTimeLimit;
Published property SearchResult: TLDAPResultList read FSearchResult;
Published property Referals: TStringList read FReferals;
Published property ExtName: AnsiString read FExtName;
Published property ExtValue: AnsiString read FExtValue;
Published property Sock: TTCPBlockSocket read FSock;

Description

Methods

Public constructor Create;
 
Public destructor Destroy; override;
 
Public function Login: Boolean;

Try to connect to LDAP server and start secure channel, when it is required.

Public function Bind: Boolean;

Try to bind to LDAP server with TSynaClient.UserName and TSynaClient.Password. If this is empty strings, then it do annonymous Bind. When you not call Bind on LDAPv3, then is automaticly used anonymous mode.

This method using plaintext transport of password! It is not secure!

Public function BindSasl: Boolean;

Try to bind to LDAP server with TSynaClient.UserName and TSynaClient.Password. If this is empty strings, then it do annonymous Bind. When you not call Bind on LDAPv3, then is automaticly used anonymous mode.

This method using SASL with DIGEST-MD5 method for secure transfer of your password.

Public function Logout: Boolean;

Close connection to LDAP server.

Public function Modify(obj: AnsiString; Op: TLDAPModifyOp; const Value: TLDAPAttribute): Boolean;

Modify content of LDAP attribute on this object.

Public function Add(obj: AnsiString; const Value: TLDAPAttributeList): Boolean;

Add list of attributes to specified object.

Public function Delete(obj: AnsiString): Boolean;

Delete this LDAP object from server.

Public function ModifyDN(obj, newRDN, newSuperior: AnsiString; DeleteoldRDN: Boolean): Boolean;

Modify object name of this LDAP object.

Public function Compare(obj, AttributeValue: AnsiString): Boolean;

Try to compare Attribute value with this LDAP object.

Public function Search(obj: AnsiString; TypesOnly: Boolean; Filter: AnsiString; const Attributes: TStrings): Boolean;

Search LDAP base for LDAP objects by Filter.

Public function Extended(const Name, Value: AnsiString): Boolean;

Call any LDAPv3 extended command.

Public function StartTLS: Boolean;

Try to start SSL/TLS connection to LDAP server.

Properties

Published property Version: integer read FVersion Write FVersion;

Specify version of used LDAP protocol. Default value is 3.

Published property ResultCode: Integer read FResultCode;

Result code of last LDAP operation.

Published property ResultString: AnsiString read FResultString;

Human readable description of result code of last LDAP operation.

Published property FullResult: AnsiString read FFullResult;

Binary string with full last response of LDAP server. This string is encoded by ASN.1 BER encoding! You need this only for debugging.

Published property AutoTLS: Boolean read FAutoTLS Write FAutoTLS;

If True, then try to start TSL mode in Login procedure.

Published property FullSSL: Boolean read FFullSSL Write FFullSSL;

If True, then use connection to LDAP server through SSL/TLS tunnel.

Published property Seq: integer read FSeq;

Sequence number of last LDAp command. It is incremented by any LDAP command.

Published property SearchScope: TLDAPSearchScope read FSearchScope Write FSearchScope;

Specify what search scope is used in search command.

Published property SearchAliases: TLDAPSearchAliases read FSearchAliases Write FSearchAliases;

Specify how to handle aliases in search command.

Published property SearchSizeLimit: integer read FSearchSizeLimit Write FSearchSizeLimit;

Specify result size limit in search command. Value 0 means without limit.

Published property SearchTimeLimit: integer read FSearchTimeLimit Write FSearchTimeLimit;

Specify search time limit in search command (seconds). Value 0 means without limit.

Published property SearchResult: TLDAPResultList read FSearchResult;

Here is result of search command.

Published property Referals: TStringList read FReferals;

On each LDAP operation can LDAP server return some referals URLs. Here is their list.

Published property ExtName: AnsiString read FExtName;

When you call Extended operation, then here is result Name returned by server.

Published property ExtValue: AnsiString read FExtValue;

When you call Extended operation, then here is result Value returned by server.

Published property Sock: TTCPBlockSocket read FSock;

TCP socket used by all LDAP operations.


Generated by PasDoc 0.9.0 on 2012-04-23 21:38:51