[Twisted-Python] HTTP Basic Auth using cred, an example
Moshe Zadka
twisted at zadka.site.co.il
Tue Nov 11 00:47:21 MST 2003
On Mon, 10 Nov 2003, Itamar Shtull-Trauring <itamar at 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 :)
More information about the Twisted-Python
mailing list