[Twisted-Python] HTTP Basic Auth using cred, an example
I've put up some code showing how to use HTTP Basic authentication together with cred to guard a resource at http://www.twistedmatrix.com/users/roundup.twistd/twisted/issue393 You need to implement a realm that returns resources, and then wrap it in a portal with an appropriate username/password credential checker. -- Itamar Shtull-Trauring http://itamarst.org/ Available for Python & Twisted consulting
On Mon, 10 Nov 2003, Itamar Shtull-Trauring <itamar@itamarst.org> wrote:
I've put up some code showing how to use HTTP Basic authentication together with cred to guard a resource at http://www.twistedmatrix.com/users/roundup.twistd/twisted/issue393
I put a somewhat different version there. Outside of some cosmetics, not that it .addBoth the logout to the notifyDone. This is important: the user should be logged out if the request is severed mid-output
You need to implement a realm that returns resources, and then wrap it in a portal with an appropriate username/password credential checker.
Of course, simpleguard.MarkingRealm can be used for that :)
participants (2)
-
Itamar Shtull-Trauring
-
Moshe Zadka