aspose file tools*
The moose likes JSP and the fly likes Authentication mechanism and code procedure from web app to an LDAP server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Authentication mechanism and code procedure from web app to an LDAP server" Watch "Authentication mechanism and code procedure from web app to an LDAP server" New topic
Author

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

Wal Samaad
Greenhorn

Joined: Jan 20, 2010
Posts: 17
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

Joined: Feb 24, 2006
Posts: 6661
    
    5

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 ?


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

Please do not cross post -> http://www.coderanch.com/t/479745/Servlets/java/Authentication-mechanism-code-procedure-from#2152070
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19692
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18564
    
    8

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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Authentication mechanism and code procedure from web app to an LDAP server