
Hello.
I've used http://jcalderone.livejournal.com/53074.html article to get http auth to work. In my server.tac file I have the following
... r = ResourceScriptWrapper('auth.rpy') err = resource.ForbiddenResource() r.putChild("service", err) upd = UpdateXMLProcessor() err.putChild("update2", upd)
httpSite = server.Site(r) httpsSite = server.Site(r) ...
auth.rpy is an exact copy of HTTPAuthSessionWrapper resource from forementioned article with two edits:
... from manage import UpdateManager ... if IResource in interfaces: resc = UpdateManager() resc.realm = self return (IResource, resc, lambda: None)
and manage.py is
from twisted.web import resource
class UpdateManager(resource.Resource): def render_GET(self, request): return "<html>Hello, world!</html>"
The authorization goes ok when I go to the server root. But when it is succeeded all I get instead of Hello, world! is No Such Resource
No such child resource.
with 404 error.
Please tell me what might I be doing wrong.
One more question:
when using twisted.cred.checkers.FilePasswordDB how can one add encrypted password entries to this file using windows
I'm now using plain-text password in httpd.password file for auth to go ok.
Thank you,
Viatcheslav Gachkaylo
Crystalnix