[Zope] - difference between AUTHENTICATED_USER and REMOTE_USER

Jim Fulton jim@digicool.com
Fri, 22 Jan 1999 10:35:22 +0000


Brian Hooper wrote:
> 
> Hi there -
> 
> I was wondering, what's the difference between the DTML variables
> AUTHENTICATED_USER (defined by Zope) and REMOTE_USER (listed in the
> DTML guide as a CGI-defined request variable.
> 
> If AUTHENTICATED_USER is defined in a given page, it seems like
> REMOTE_USER should also be defined - however, when I do something like
> 
> <!--#if AUTHENTICATED_USER-->
> <!--#var REQUEST-->
> <!--#/if-->
> 
> REQUEST contains a lot of stuff but not REMOTE_USER.  Am I misunderstanding
> the meaning of this variable?

Yes. REMOTE_USER is only present if authentication is
performed by the web server.  If REMOTE_USER is defined, then
AUTHENTICATED_USER will be also, and they will have the same
string representation.

> (the reason I want to do this is, I want to use the name of the remote user
> as a parameter for a database access; there must be a good way to do this)

Just use AUTHENTICATED_USER.

Jim

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (540) 371-6909              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.