Nov. 11, 2003
7:47 a.m.
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 :)