How to use Windows login for single-sign-on and for Active Directory entries for Desktop Java applic

Posted by Touko on Stack Overflow See other posts from Stack Overflow or by Touko
Published on 2009-02-13T11:52:08Z Indexed on 2010/04/07 8:23 UTC
Read the original article Hit count: 513

I'd like to have my desktop Java application to have single sign on related to Active Directory users. In two steps, I'd like to :

  1. Be sure that the particular user has logged in to Windows with some user entry.
  2. Check out some setup information for that user from the Active Directory

With http://stackoverflow.com/questions/31394/java-programatic-way-to-determine-current-windows-user I can get the name of the current Windows user but can I rely to that? I think the

System.getProperty("user.name")

won't be secure enough? ("user.name" seems to be got from environment variables, so I can't rely on that, I think?)

Question http://stackoverflow.com/questions/390150/authenticating-against-active-directory-with-java-on-linux provides me the authentication for given name+pass but I'd like to authenticate based on the Windows logon?

For the Active Directory access, the LDAP would probably be the choise?

I'm not totally sure if I'm asking the right questions but hopefully somebody has some ideas to forward me on.

© Stack Overflow or respective owner

Related posts about java

Related posts about sso