[Zope] Basic Authentication Realm

Kevin Gill kevin@movieextras.ie
Sat, 8 Mar 2003 13:34:02 +0000

Browser Friendly Message via Basic Authentication (Zope/exUserFolder)

I want to set a realm for a part of a site. Basically, I have two directories, 
one for category A users and one for category B users.

I want the accesses to each to be identified as a different realm, so that 
Basic authentication can be used to login to both areas with different 
credentials, and also so that the message displayed in the browser is 

I have found that I can set the realm for a Zope instances via Z_REALM or 
__bobo_realm__. However, I do not seem to be able to set it for a directory 
or hierarchy.

It appears that I can set the variable response.realm, if I have some python 
which is called. I am using exUserFolder, so my code is never called if the 
security check fails, which prevents me from setting the variable.

My web-site is hosted (by amaze.nl), so I would rather not have to change 
exUserFolder sources.

I would appreciate any solutions or advice from anyone on the list.

Kevin Gill