aspose file tools*
The moose likes Servlets and the fly likes PLEASE HELP... Authentication Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "PLEASE HELP... Authentication" Watch "PLEASE HELP... Authentication" New topic
Author

PLEASE HELP... Authentication

Thomas Mcfarrow
Ranch Hand

Joined: Jul 09, 2001
Posts: 137
Hello,

Is there a way to get the userid of the user that logged onto windows and pass it onto a servlet (without the user doing anything).

We have a protected domain (for windows) and they want to use this identity to log onto our protected web resource.


Regards
unni krishna
Ranch Hand

Joined: Jul 14, 2004
Posts: 39
Just type "set" on your windows CMD window. You could see an environment variable USERNAME=xyz . You must be able to get this env variable thru Java and use it. Hope this helps.


Software Engineer (SCJP)<br />USTechnology, CA
siva krishnan
Greenhorn

Joined: Apr 26, 2003
Posts: 21
Hi Unni,

Thanks...but could you add more on this, what is the exact syntax to get the USERNAME env variable within the servlet ?


Cheers<br />Siva<br />SCJP 1.4<br />SCWCD 1.3
Thomas Mcfarrow
Ranch Hand

Joined: Jul 09, 2001
Posts: 137
Hello,

Is getting the window's login name possible since all the java code is on the server?

Coldfusion could do what I am asking.
[ July 14, 2004: Message edited by: Thomas Mcfarrow ]
REH Henderson
Greenhorn

Joined: Jun 17, 2004
Posts: 5
Originally posted by Thomas Mcfarrow:
Hello,

Is there a way to get the userid of the user that logged onto windows and pass it onto a servlet (without the user doing anything).

We have a protected domain (for windows) and they want to use this identity to log onto our protected web resource.


Regards


If you have the newer window version 98 it's really going to be hard to over
ride the program.You can usually double click the "X" to get rid of it
but if all fails you would have to use a .BAT file within the system
to override the windows code program.

Windows 2000 your pretty much... out of luck! Because you may get a
message that says "administrator" only parental code is in play and or
your not suppose to be in the computer.

If the computer is yours "Hint" you can get the receipt and the manufactures No.off the back of the computer and call 800 number to DELL. They will give you a 7 digit code to get in the computer or tell how to erase the code that's already in the machine.

But it all kinds of ways to ................?!


Richie Henderson
unni krishna
Ranch Hand

Joined: Jul 14, 2004
Posts: 39
Sorry, what i said is wrong. USERID env variable gets set on the remote user's machine. I could'nt find any method to get that. If you get a solution pls update me also. This is a good requirement.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: PLEASE HELP... Authentication