On Thu, 2004-01-29 at 09:36, Paul Moore wrote:
I want to build a web application which requires users to log on. I'm happy building the user authentication side of things, but I'm not sure how to get the site to require authentication. I'm looking for what I think is "Basic" authentication - the one that causes the browser to pop up an "enter username and password" dialog box.
A Google search for "site:twistedmatrix.com basic http authentication" turns up a number of useful links, but until Pyramid's back on its feet, you've got to go cache-hunting. Here's a few tidbits that'll probably help: In Resource.render():
request.setHeader('WWW-authenticate', 'basic realm="foo"')
Wherever else:
u = request.getUser() p = request.getPassword()
Hope this helps. -- Alex Levy WWW: http://mesozoic.geecs.org "Never let your sense of morals prevent you from doing what is right." -- Salvor Hardin, Isaac Asimov's _Foundation_