如何将 Delphi 与 Active Directory 集成? [英] How do integrate Delphi with Active Directory?

查看:37
本文介绍了如何将 Delphi 与 Active Directory 集成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们需要使用 Delphi 7 在 Microsoft 的 Active Directory 上验证用户,这样做的最佳方法是什么?

We need to validate an user on Microsoft's Active Directory using Delphi 7, what is the best way to do that?

我们可以有两种情况:用户输入其网络用户名和密码,其中用户名可能包含域,然后我们检查活动目录是否是有效的活动用户.或者我们从 Windows 获取当前登录的用户,并检查 AD 是否仍然有效.

We can have two scenarios: the user inputs its network username and password, where the username may include the domain, and we check on active directory if it is a valid, active user. Or we get the current logged user from Windows, and check on AD if it is still valid.

第一个场景需要用户验证,而第二个场景只是简单的 AD 搜索和定位.

The first scenario requires user validation, while the second one just a simple AD search and locate.

有没有人知道执行上述一种或两种情况的组件或代码?

Does anyone know of components or code that do one or both of the scenarios described above?

推荐答案

我很高兴看到这里提到我的 ADSISearch 组件 :-),但是为了简单地验证用户凭据,您最好使用登录用户"Win32 API.我很确定(我自己不再做任何 Delphi 工作了)有一个浮动的实现 - 可能在 JVCL 库或其他地方.

I'm flattered to see my ADSISearch component mentioned here :-), but in order to simply validate user credentials, you're probably even better off using the "LogonUser" Win32 API. I'm pretty sure (not doing any Delphi work anymore myself) that there's an implementation of that floating around somewhere - probably in the JVCL library or somewhere else.

这篇关于如何将 Delphi 与 Active Directory 集成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆