Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Authentication mechanism and code procedure from web app to an LDAP server

 
Wal Samaad
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello, i have posted a couple of entries here with regards to authenticating to an LDAP server and some of the members are thinking, i am an hacker/cracker of a sort. Please could anyone tell/show me how to write the code for authentication from users on a web app to an LDAP server. I have a web app written already but users entries are stored in an LDAp server, i need to authenticate user from that dirctory, what do i do and how am i suppose to strcuture the code. I am using JAVA EE, MySQL server and a Sun Directory Enterprise Edition LDAP server. thanks
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What app server is it ? There are many ways. You can configure the LDAP in the app server so that it recognizes the users automatically. Or you can perform programmatic authentication by binding to the LDAP. Does Sun LDAP server provide an API you can use ?
 
Rob Spoor
Sheriff
Pie
Posts: 20511
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although that thread no longer exists this one does. I've closed that one to continue here, but my web.xml addition may still be useful.
 
Paul Clapham
Sheriff
Pie
Posts: 20966
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My Google query for "java ldap" very quickly returned this link:

http://java.sun.com/products/jndi/tutorial/ldap/security/ldap.html

A tutorial about LDAP authentication in Java! What more could you ask for?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic