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