Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

get current user information

Posted on 2006-06-12
7
Medium Priority
?
1,825 Views
Last Modified: 2007-12-19
hi guys,

i would like to get the current session user information from active directory by ldap in java.

thanks in advance...
0
Comment
Question by:ysnky
  • 3
7 Comments
 
LVL 30

Expert Comment

by:Mayank S
ID: 16883672
You can get the current user-name using System.getProperty ( "user.name" ) ;

For LDAP, try this library: http://www.openldap.org/jldap/
0
 
LVL 30

Accepted Solution

by:
Mayank S earned 500 total points
ID: 16883684
Any LDAP authentication routine typically contain two binds. The first bind should be as a service account (probably better not to use the directory-manager account) which does the search for the user's DN. The second bind actually binds as the user with the password given, so you don't need to compare anything. The directory simply returns authentication success or failure (the latter throws an AuthenticationException).
 
LDAP authentication tutorial - http://java.sun.com/products/jndi/tutorial/ldap/security/ldap.html
0
 

Assisted Solution

by:vpaturu
vpaturu earned 500 total points
ID: 16883933
0
 
LVL 9

Author Comment

by:ysnky
ID: 16885468
could you send me source code which list user fullname, email and display name...?
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16886004
Its available on the link I posted.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question