问题
Can anyone please tell me how to do user authentication through windows corporate domain login id and password... so if the user is already logged in, the application should not ask for username and password.
Whole Scenario: We have a web application that anyone can access.. if you are outside from the company network- do SSO through saml.
If user is on company premises- do the authentication through the machine's username and password.
I hope you got my point.. please let me know if you have any doubt.. Note : Webapplication is developed in Java... so solution should be in java.
回答1:
This Oracle tutorial explains which APIs to use and how. Essentially you need a Java Kerberos integration point. Apache Tomcat has one (if you want to look at how they do it, go here).
Google also led me to this project which might help you.
Lastly have a look at Java SSO: Kerberos authentication against Active Directory.
回答2:
I think authentication can't be by passed. You have to do it programaticaly rather than asking user to input authentication details.
First get current user's windows login user'name. There must be a login machanism like LDAP for authenticate user to allow him to log-in in windows. Check this user exist in like LDAP then by pass for web application's authentication machenism.
回答3:
you can pass network username and password in the URL like below
http://username:password@example.com/yourpath/etc
来源:https://stackoverflow.com/questions/23655816/java-j2ee-authentication-through-window-login