Python, Win2000 serv and missing LOGON_USER variable :(

J

JZ

I am using Webware installed on Windows2000 server and I found I
could not find all server variable like PHP could. E.g. Windows2000
server has specific variable LOGON_USER which is set for every
logged person. PHP can easy get to this using $_SERVER['LOGON_USER'].
I want to do the same with Webware but I do not know how...

Only small sets of variables are available for request()._environ
variable which I got with the following code (for Webware):

for k in self.request()._environ:
self.write(k,'=>',self.request()._environ[k],'<br />')

Is it posible to get that server variable with Python??? That variable
is available only with Windows2000 server platform.
 
T

Tim Roberts

JZ said:
I am using Webware installed on Windows2000 server and I found I
could not find all server variable like PHP could. E.g. Windows2000
server has specific variable LOGON_USER which is set for every
logged person. PHP can easy get to this using $_SERVER['LOGON_USER'].
I want to do the same with Webware but I do not know how...

LOGON_USER only exists when you actually use basic authentication. Are you
doing that? It isn't trivial with Webware. Remember that IIS isn't
serving from your applet directory -- Webware is. A .htaccess file won't
do what you think it will.

Have you looked over UserKit or WebKit\SecurePage.py to see the recommended
methods of handling user validation through the applets?
 
J

JZ

I am using Webware installed on Windows2000 server and I found I
could not find all server variable like PHP could. E.g. Windows2000
server has specific variable LOGON_USER which is set for every
logged person. PHP can easy get to this using $_SERVER['LOGON_USER'].
I want to do the same with Webware but I do not know how...

LOGON_USER only exists when you actually use basic authentication.

Webkit/Examples/SecurePage.py deals only with manual authentication.
But I want to login _only once_, during logging to ma workstation. So
that example does not help.

The solution for my problem is: win32api.GetUser()
 
T

Tim Roberts

JZ said:
Tim Roberts said:
I am using Webware installed on Windows2000 server and I found I
could not find all server variable like PHP could. E.g. Windows2000
server has specific variable LOGON_USER which is set for every
logged person. PHP can easy get to this using $_SERVER['LOGON_USER'].
I want to do the same with Webware but I do not know how...

LOGON_USER only exists when you actually use basic authentication.

Webkit/Examples/SecurePage.py deals only with manual authentication.
But I want to login _only once_, during logging to ma workstation. So
that example does not help.

The solution for my problem is: win32api.GetUser()

OK, but are you aware that this will only tell you the name of the user
that happens to own the Webware process? It isn't the user running the
browser, and it isn't even necessarily the user currently logged in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top