• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1857
  • Last Modified:

get current user information

hi guys,

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

thanks in advance...
0
ysnky
Asked:
ysnky
  • 3
2 Solutions
 
Mayank SAssociate Director - Product EngineeringCommented:
You can get the current user-name using System.getProperty ( "user.name" ) ;

For LDAP, try this library: http://www.openldap.org/jldap/
0
 
Mayank SAssociate Director - Product EngineeringCommented:
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
 
vpaturuCommented:
0
 
ysnkyAuthor Commented:
could you send me source code which list user fullname, email and display name...?
0
 
Mayank SAssociate Director - Product EngineeringCommented:
Its available on the link I posted.
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now