This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes Windows Authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Windows Authentication" Watch "Windows Authentication" New topic

Windows Authentication

Sahil Sharma
Ranch Hand

Joined: Aug 27, 2003
Posts: 152
Hi All,

We are building an intranet site, where we want to authenticate the user on the basis of his windows login, instead of providing him a login page. This will help the users to remember their password easily.
How this can be achieved thru java.

Thnx in adv.
Stuart Gray
Ranch Hand

Joined: Apr 21, 2005
Posts: 410
You can retrieve the user name using getProperty(""), but I'm sure you'll have to resort to JNI for the password. Or more likely, you will have to hash a String and compare that to the stored password.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Unforunately is far more complicated than that. You should have a look at Samba NTLM authentication or Taglish SSPI JAAS provider. And (unless you already know about these) read up on NTML and JAAS.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
raphael Bereh
Ranch Hand

Joined: Jan 15, 2002
Posts: 79
JAAS is another java API that deals with this kind of this. J2EE has support for JAAS . I think you can hook things like LDAP to JAAS.

I agree. Here's the link:
subject: Windows Authentication
Similar Threads
need to startup tomcat at machine startup
Change password windows form control using LDAP in tomcat 5.0.
[Subversion] how to display the real author name in Subclipse
JSP page on closing the parent window the child windows should close automatically.
want to disable ALT+TAB key using java