MS NT authentication in Java programs
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vyacheslav_Yakovenko
Posted On:   Thursday, August 8, 2002 06:36 AM

Hi, All



Is there any possibilities to use MS NT authentication in Java programs?

I have an intranet based on NT/W2K and I’ll be very happy,

if I can determine the user name from my JSP/Servlet modules.



Regards, Vyacheslav

Re: MS NT authentication in Java programs

Posted By:   Roeland_Lengers  
Posted On:   Friday, August 9, 2002 10:52 PM

I don't know the finer details, buit there is an API from sun called JAAS. These have been tested for Solaris and NT authentication.



Take a look at http://java.sun.com/products/jaas/index-14.html for details.



Hope this helps.

Re: MS NT authentication in Java programs

Posted By:   Animesh_Srivastava  
Posted On:   Thursday, August 8, 2002 08:13 AM

On second thoughts, you could also try using trusted applets and access native methods from them doing System.loadLibrary("somedll.dll").But this again will depend upon the restriction imposed on Applets by the browser.


Or yet another method is - you could use LiveConnect :)

Re: MS NT authentication in Java programs

Posted By:   Animesh_Srivastava  
Posted On:   Thursday, August 8, 2002 08:02 AM

Hi,

I dont think it is possible unless you are having a control installed on the clients machine. A simple dll which just calls the GetUserName() function of advapi32.dll will be sufficient. All you need to do is then instantiate your dll in a javascript function and make a call to it.


But the really big issue here is that your users should trust your dll and be ready to install it on their machine. Ofcourse, this is no surprise because once you have your dll on their machine, you can do almost anything. Though advapi32.dll itself has this function, but I think it cant be instantiated. So you will have to wrap it in a dll of your own. Once the username is available to the javascript function, it will be easily available to any section of your code (jsp,applets etc.)


Hope that helps.

Animesh.
About | Sitemap | Contact