How to use Windows login for single-sign-on and fo

2019-01-31 17:06发布

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 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, 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.

8条回答
狗以群分
2楼-- · 2019-01-31 17:43

Project Waffle has both client and server-side code to do SSO on Windows. It's JNA-based, no native libraries required.

查看更多
小情绪 Triste *
3楼-- · 2019-01-31 17:45

This article from Sun, and this open source library might be able to get you what you need.

查看更多
登录 后发表回答