By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,550 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,550 IT Pros & Developers. It's quick & easy.

Python, Win2000 serv and missing LOGON_USER variable :(

P: n/a
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.

--
JZ
Jul 18 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
JZ <cy*************@ncbybtrglxn.pbz> wrote:

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?
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 18 '05 #2

P: n/a
JZ
On Tue, 10 Feb 2004 00:23:49 -0800, Tim Roberts <ti**@probo.com>
wrote:
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()

--
JZ
Jul 18 '05 #3

P: n/a
JZ <cy*************@ncbybtrglxn.pbz> wrote:
Tim Roberts <ti**@probo.com> wrote:
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.
--
- Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
Jul 18 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.