Componentes.Terceros.RemObj.../internal/6.0.43.801/1/RemObjects SDK for Delphi/Source/uROLDAP.pas
2010-01-29 16:17:43 +00:00

49 lines
1.8 KiB
ObjectPascal

unit uROLDAP;
{----------------------------------------------------------------------------}
{ RemObjects SDK Library - Core components }
{ }
{ compiler: Delphi 6 and up, Lazarus/FPC }
{ platform: Win32, Linux, MacOS }
{ }
{ (c)opyright RemObjects Software. all rights reserved. }
{ }
{ Using this code requires a valid license of the RemObjects SDK }
{ which can be obtained at http://www.remobjects.com. }
{----------------------------------------------------------------------------}
{$I RemObjects.inc}
interface
{ Note: for TLS/SSL support, you should include one from these files into your project
ssl_cryptlib.pas
ssl_openssl.pas
ssl_sbb.pas
ssl_streamsec.pas
}
function LDAPPlainCheck(const aUserName, aPassword, aHost: string; aPort: integer; const UseTLS: Boolean = False; const UseSSL: Boolean = False): Boolean;
implementation
uses
SysUtils,
ldapsend;
function LDAPPlainCheck(const aUserName, aPassword, aHost: string; aPort: integer; const UseTLS: Boolean = False; const UseSSL: Boolean = False): boolean;
var
ldap: TLDAPsend;
begin
ldap:= TLDAPsend.Create;
try
ldap.TargetHost := aHost;
ldap.TargetPort := IntToStr(aPort);
ldap.UserName := aUserName;
ldap.Password := aPassword;
ldap.AutoTLS := UseTLS;
ldap.FullSSL := UseSSL;
Result := ldap.Login and ldap.Bind;
finally
ldap.Free;
end;
end;
end.