GithubHelp home page GithubHelp logo

mh4x0f / vcl-activedirectory4delphi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from edzava/vcl-activedirectory4delphi

0.0 0.0 0.0 421 KB

Delphi basic library for validation and authentication of LDAP users in Active Directory.

License: MIT License

Pascal 100.00%

vcl-activedirectory4delphi's Introduction

demo

ActiveDirectory4Delphi

Delphi basic library for validation and authentication of LDAP users in Active Directory.

release Delphi Supported Versions Platforms Twitter: ZavaDev

⚙️ Installation

  • Manual installation: Add the following folders to your project, in Project > Options > Resource Compiler > Directories and Conditionals > Include file search path
../VCL-ActiveDirectory4Delphi/src/Core
../VCL-ActiveDirectory4Delphi/src/Interfaces
../VCL-ActiveDirectory4Delphi/src/Winapi

⚡️ Quickstart

You need to use ActiveDirectory.Client

uses ActiveDirectory.Client;
  • Authenticate current user
procedure Authenticate(UserPass: string);
var
  CurrentUserName: string;
  CurrentDomainName: string;
  CurrentLDAPDomainName: string;
begin
  if (not ActiveDirectoryClient.GetActiveDirectoryEnabled) then
    Exit;

  CurrentUserName := ActiveDirectoryClient.GetCurrentUserName;
  CurrentDomainName := ActiveDirectoryClient.GetCurrentDomainName(CurrentUserName);  
  CurrentLDAPDomainName := ActiveDirectoryClient.GetCurrentLDAPDomainName(CurrentDomainName);  

  if ActiveDirectoryClient.AuthenticateUser(CurrentLDAPDomainName, CurrentUserName, UserPass) then
    ShowMessage('ok')
  else
    ShowMessage('Fail');
end;
  • Validation user active
procedure ValidationUserActive(DomainName, UserName: string);
begin
  if ActiveDirectoryClient.GetUserActive(DomainName, UserName) then
    ShowMessage('ok')
  else
    ShowMessage('Fail');
end;

more information look at the unit ActiveDirectory.Client

✨ App demo using library

Download Win32, Win64

Application of example of using the library and information that could be recovered.

demo

Get Current Info

Retrieve the information of the current section.

AllProviders = WinNT:,LDAP:
CurrentUserName = usuario1
CurrentDomainName = MYDOMAIN
CurrentLDAPDomainName = DC=MYDOMAIN,DC=TEST
ActiveDirectoryEnabled = True

Get User Info

Retrieve user information using the domain and user indicated in the text boxes.

Param.Domain = MYDOMAIN
Param.UserName = usuario1
UserFind = True
UserActive = True
UserInfo.UID = usuario1
UserInfo.UserName = usuario1
UserInfo.Description = Descripcion del usuario 1
UserInfo.Password.Expired = False
UserInfo.Password.NeverExpires = False
UserInfo.Password.CannotChange = False
UserInfo.Disabled = False
UserInfo.LockedOut = False
UserInfo.Groups = gusuarios,Usuarios del dominio

Authenticate

Authenticate using the domain and user indicated in the text boxes.

Param.Domain = MYDOMAIN
Param.UserName = usuario1
Param.UserPass = *********
Authenticated = True

Author

👤 Zava

Show your support

Give a ⭐️ if this project helped you!

License

ActiveDirectory4Delphi is MIT licensed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.