Solved

get current user information

Posted on 2006-06-12
7
1,709 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 125 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 125 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
topping1 challenge 7 73
table example 4 22
servlet example issue 6 31
type mismatch (Object[] to double[] 3 0
INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
This video teaches viewers about errors in exception handling.

910 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

21 Experts available now in Live!

Get 1:1 Help Now