<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2734.1600" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I got a problem using a custom-made web-application 
built upon Twisted. My problem is that when I ask a user for authentication, the 
cookie or whatever it is, is not available in the request-object for other sites 
than the one who asked for authentication. I want the user to login on one page, 
which sets the correct info so I can use request.getUser() and 
request.getPassword() later on all other pages to validate access to the 
requested resources.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>In my RootResource I return something like this if 
I want the user authenticated:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>request.setHeader('WWW-authenticate', 'Basic 
realm="%s"' % ("/"))<BR>errpage = error.ErrorPage(http.UNAUTHORIZED, 
"Unauthorized", "401 Authentication required")<BR>return 
errpage.render(request)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Is Basic realm = "/" correct if I want this 
authentication to be valid site-wide? What else can I use? What other approach 
can I use?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Happy for any hints or clues.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks in advance,</FONT></DIV>
<DIV><FONT face=Arial size=2>Thomas</DIV>
<DIV><BR></DIV></FONT></BODY></HTML>