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 :
- Be sure that the particular user has logged in to Windows with some user entry.
- 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.