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 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 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, LDAP would probably be the choice?