简体   繁体   English

如何在XPages中使用Java对Active Directory进行身份验证

[英]How to authenticate with Active Directory using java in XPages

I need to know if a user entered correct login information to Microsoft Active directory 我需要知道用户是否在Microsoft Active Directory中输入了正确的登录信息

I want the user to enter username and password on an xpage and it should only return if these values was entered correctly or not. 我希望用户在xpage上输入用户名和密码,并且只有在正确输入或未输入这些值的情况下,它才应返回。

I know I can use ldap requests and send in credentials but have not seen any working solutions for this. 我知道我可以使用ldap请求并发送凭据,但是还没有看到任何有效的解决方案。

I need to use java as the code should be able to run on non windows servers 我需要使用Java,因为代码应该能够在非Windows服务器上运行

There are a number of approaches you can take: 您可以采取多种方法:

  • The easiest would be to link the AD to Domino using DirectoryAssistance and let users login using their AD credentials in the first place. 最简单的方法是使用DirectoryAssistance将AD链接到Domino,并首先让用户使用其AD凭证登录。
  • If IIS is running on the AD server you could send an HTTP request using the Apache HTTPClient (and basic authentication) and see what's coming back 如果IIS在AD服务器上运行,则可以使用Apache HTTPClient(和基本身份验证)发送HTTP请求,然后查看返回的内容
  • The best working Java libraries are listed in the Apache Directory project . Apache Directory项目中列出了运行最好的Java库。 There you would do an LDAP query (eg the user herself) 在那里您将执行LDAP查询(例如,用户本人)

Let us know which one works for you 让我们知道哪一个适合您

You can use JNDI to access the Active Directory. 您可以使用JNDI访问Active Directory。 There are a lot of ressources on the web on how to do this, for example have a look at http://mhimu.wordpress.com/2009/03/18/active-directory-authentication-using-javajndi/ 网上有很多关于如何执行此操作的资源,例如,请访问http://mhimu.wordpress.com/2009/03/18/active-directory-authentication-using-javajndi/

You have tagged the question as XPage, do you want to do the authentication from inside domino? 您已将问题标记为XPage,是否要从多米诺内部进行身份验证? In that case the domino server could do the authentication. 在这种情况下,多米诺服务器可以进行身份​​验证。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用LDAP,Java Play Framework通过Active Directory进行身份验证 - Authenticate via Active Directory using LDAP, Java Play Framework 如何通过Java从Active Directory验证用户身份? - How to authenticate user against Active Directory from java? 如何使用Spring Ldap在Active Directory中对用户进行身份验证和搜索 - How authenticate and search user in Active Directory using Spring Ldap 如何使用受信任的域用户向活动目录进行身份验证? - How to authenticate to active directory using trusted domain user? 使用用户名使用UnboundID对Active Directory用户进行身份验证 - Authenticate an Active Directory user with UnboundID using username 无法使用Azure Active Directory验证用户 - Not able to authenticate user using Azure Active Directory 如何使用Java删除Active Directory中的用户 - How to delete user in Active Directory using Java 如何使用Spring Security对Active Directory服务器进行身份验证? - How do you authenticate against an Active Directory server using Spring Security? 如何从Sharepoint 2013 Web服务和活动目录对用户进行身份验证 - How to authenticate users from sharepoint 2013 web service and active directory 如何使用LDAP Active Directory验证JSP登录页面 - How to authenticate JSP login page with LDAP Active Directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM