Solved

get current user information

Posted on 2006-06-12
7
1,686 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:mayankeagle
Comment Utility
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:
mayankeagle earned 125 total points
Comment Utility
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 125 total points
Comment Utility
0
 
LVL 9

Author Comment

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

Expert Comment

by:mayankeagle
Comment Utility
Its available on the link I posted.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

772 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now