[Twisted-Python] Twisted-Web: Authenticating a usersite-wide ??
2002 at weholt.org
Sat Jan 3 17:45:43 EST 2004
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.
In my RootResource I return something like this if I want the user authenticated:
request.setHeader('WWW-authenticate', 'Basic realm="%s"' % ("/"))
errpage = error.ErrorPage(http.UNAUTHORIZED, "Unauthorized", "401 Authentication required")
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?
Happy for any hints or clues.
Thanks in advance,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Twisted-Python