• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Getting windows NT login through an applet?

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
helo everyone,
i'm building a web based application for our local Lan in which i want my applet to get me the current user login name of every person who access my site...
can any one help me regarding this ?
waiting for ur replies
thanx
 
Saloon Keeper
Posts: 28424
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
An applet can use the java.lang.System.getProperty("user.name") call to get the logon ID (if applicable). However, this is almost certainly going to be forbidden by the sandbox when running in a browser.
Another sticky point is that when you talk to a web server your LAN user ID may not apply - Web user IDs and LAN user IDs are only the same if the web server has been configured that way. In IIS, it's a configurable option. In many web servers, it's not - unless the web site is set up for authentication, the user HAS no distinct identity.
 
Asif Anis
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
now what am i supposed to do... i've seen this information of current user id in the window registry and i can use a active x control along with jni to get the current user name but then what will i do if user loginto the system from someother platform?
 
Tim Holloway
Saloon Keeper
Posts: 28424
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, that's the problem. There are systems where you don't have to log in at all, so they HAVE no user IDs. Conversely, a lot of corporate environments have users logged into Novell, NT domains, Windows Workgroups, mainframes, etc. all at once, and they may not all be under the same ID (this can be very messy, but I've experienced it myself!).
In an Internet context, the only meaningful user ID is the one your web server interacts with. For non-IIS servers or IIS using other than Windows user identification, this means that on the server you set up your own user account database. If your web server is doing the authentication, the user ID typically shows up in the server log (it's also available as the REMOTE_USER CGI variable in Apache).
If you are in a controlled (intranet) environment, I'd recommend the System.getProperty() over JNI-ActiveX, though. Either way you have to sign the applet, and getProperty is both more portable and more secure than ActiveX.
 
What? What, what, what? What what tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic