• Post Reply Bookmark Topic Watch Topic
  • New Topic

Active Directory Authentication using java

 
jerry conosm
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Has anyone of you have done authentication using java and ms active directory? I'm a newbie in this area of Java and our client requires that there web application be authenticated using their ms active directory. I appreciate if you can share some code to do this.

Thanks in Advance.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
AD can act as an LDAP server, and as such be accessed via JNDI.

Some links on using AD for authentication be found in this thread.
 
jerry conosm
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ulf,

I looked at this thread and it seems that they are discussing authentication using JAAS and AD. What I need is an LDAP way of accessing Active Directory. Do you know if there are threads that discuss LDAP authentication using AD.

I appreciate any help.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea, but I bet the Search link does
 
mih ira
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Dale Seng
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure the code that's posted answers the OP's question. The code shows that "user" and "password" are built into the LDAP context to "bind" to the LDAP data. That's step 1. Step 2 would be to USE that context to determine if any random user/password pair in that context are valid.

--Dale--
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!