rasaliad Posted May 2, 2014 Share Posted May 2, 2014 Hi, We have to develop a new project for a customer, and we are planing to use Unigui to develop it. The custometo ono jr ask us to use Active Directory and AzMan (Authorization Manager), and may question is?: Has someone use AzMan with UniGui?, How to use it?, the customer say that other application (Asp.Net) use it... How can i implement this.? Also I want how to use Active Directory with Unigui, is it possibly? Thanks in Advanced Link to comment Share on other sites More sharing options...
zilav Posted May 3, 2014 Share Posted May 3, 2014 http://forums.unigui.com/index.php?/topic/3469-sample-active-directory-browser/&do=findComment&comment=16327 As for AzMan, I assume it is not different to using any other windows API, use MSDN help. Link to comment Share on other sites More sharing options...
rasaliad Posted May 3, 2014 Author Share Posted May 3, 2014 Thanks zilav I Will try what you point me and will post here the results. It is the first time i will try AzMan. rasaliad. Link to comment Share on other sites More sharing options...
rencarnacion Posted May 6, 2014 Share Posted May 6, 2014 Now I'm Using Active Directory in my Application and It's Work Very Good, there are a free components for Active Directory http://www.agnisoft.com/white_papers/active_directory.asp Try to use these the component, they come with many Demos I hope these can help you Link to comment Share on other sites More sharing options...
deljavan Posted May 16, 2020 Share Posted May 16, 2020 hi you can help me for this subject. http://www.agnisoft.com/white_papers/active_directory.asp source code is deleted .... Link to comment Share on other sites More sharing options...
Mehmet Emin Posted May 16, 2020 Share Posted May 16, 2020 Hi I am using this code it may help you TdmLoginModule = class(TDataModule) qryUser: TFDQuery; qryUserRoles: TFDQuery; private { Private declarations } function LDAPLogin(ADomain, AUserCode, APassword: string): Boolean; public { Public declarations } function UserLogin(ADomain, AUserCode, APassword: string): Boolean; end; function TdmLoginModule.LDAPLogin(ADomain, AUserCode, APassword: string): Boolean; var hToken: THandle; begin Result := False; if (LogonUser(pChar(AUserCode), pChar(ADomain), pChar(APassword), LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, hToken)) then begin CloseHandle(hToken); Result := True; end; end; function TdmLoginModule.UserLogin(ADomain, AUserCode, APassword: string): Boolean; var I: Integer; AuthSuccess: Boolean; begin Result := False; AuthSuccess := False; if (Trim(AUserCode) = '') or (Trim(APassword) = '') then Exit; if Trim(ADomain) <> '' then begin AuthSuccess := LDAPLogin(ADomain, AUserCode, APassword); if not AuthSuccess then Exit; AUserCode := AUserCode + '@' + ADomain; end; ................ Just disregard AUserCode := AUserCode + '@' + ADomain; I just use it for domain users for internal reasons. Other than that Above code works That is it. Link to comment Share on other sites More sharing options...
azago Posted May 17, 2020 Share Posted May 17, 2020 try this solution http://adsi.mvps.org/adsi/Delphi/index.html active directory helper package http://adsi.mvps.org/adsi/Delphi/ADHelperPackage.zip Link to comment Share on other sites More sharing options...
deljavan Posted May 17, 2020 Share Posted May 17, 2020 Thank you all My problem was solved this way .... Quote function TdmLoginModule.LDAPLogin(ADomain, AUserCode, APassword: string): Boolean; var hToken: THandle; begin Result := False; if (LogonUser(pChar(AUserCode), pChar(ADomain), pChar(APassword), LOGON32_LOGON_INTERACTIVE, LOGON32_PROVIDER_DEFAULT, hToken)) then begin CloseHandle(hToken); Result := True; end; end; To use this component, there is a ready-made sample that can be used to obtain the necessary skills from its source Quote try this solution http://adsi.mvps.org/adsi/Delphi/index.html active directory helper package http://adsi.mvps.org/adsi/Delphi/ADHelperPackage.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now