# Class TLDAPSend

Description | Hierarchy | Fields | Methods | Properties

## Unit

ldapsend

## 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

- TObject
- TSynaClient
- TLDAPSend

## Overview

### Methods

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

### Properties

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

## Description

### Methods

| `constructor Create;`

| `destructor Destroy; override;`

| `function Login: Boolean;`

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

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

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

| `function Logout: Boolean;`

Close connection to LDAP server.

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

Modify content of LDAP attribute on this object.

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

Add list of attributes to specified object.

| `function Delete(obj: AnsiString): Boolean;`

Delete this LDAP object from server.

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

Modify object name of this LDAP object.

| `function Compare(obj, AttributeValue: AnsiString): Boolean;`

Try to compare Attribute value with this LDAP object.

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

Search LDAP base for LDAP objects by Filter.

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

Call any LDAPv3 extended command.

| `function StartTLS: Boolean;`

Try to start SSL/TLS connection to LDAP server.

### Properties

| `property Version: integer read FVersion Write FVersion;`

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

| `property ResultCode: Integer read FResultCode;`

Result code of last LDAP operation.

| `property ResultString: AnsiString read FResultString;`

Human readable description of result code of last LDAP operation.

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

| `property AutoTLS: Boolean read FAutoTLS Write FAutoTLS;`

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

| `property FullSSL: Boolean read FFullSSL Write FFullSSL;`

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

| `property Seq: integer read FSeq;`

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

| `property SearchScope: TLDAPSearchScope read FSearchScope Write FSearchScope;`

Specify what search scope is used in search command.

| `property SearchAliases: TLDAPSearchAliases read FSearchAliases Write FSearchAliases;`

Specify how to handle aliases in search command.

| `property SearchSizeLimit: integer read FSearchSizeLimit Write FSearchSizeLimit;`

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

| `property SearchTimeLimit: integer read FSearchTimeLimit Write FSearchTimeLimit;`

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

| `property SearchResult: TLDAPResultList read FSearchResult;`

Here is result of search command.

| `property Referals: TStringList read FReferals;`

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

| `property ExtName: AnsiString read FExtName;`

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

| `property ExtValue: AnsiString read FExtValue;`

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

| `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