Authentication not working

Viatcheslav Gachkaylo <[email protected]>
Newsgroups gmane.comp.python.twisted.web
Message-ID <CADUmcBMcancVGRQYnkvJA9KYmF3akk33Swu7SqAbb7wdtiFQcw@mail.gmail.com>
Hello.

I ask you to help me finding the source of problems with the following code.
The result of opening page at
https://serveraddr:serverport/services/admin is 403 Forbidden.
It needs to show the output from UpdateManager.render_GET().
In server.tac

...

root = resource.ForbiddenResource()
err = resource.ForbiddenResource()
root.putChild("service", err)
upd = UpdateXMLProcessor()
err.putChild("update2", upd)

portal = Portal(PublicHTMLRealm(), [FilePasswordDB('httpd.password')])
credentialFactory = DigestCredentialFactory("md5", "House of Life Updates")
admin = HTTPAuthSessionWrapper(portal, [credentialFactory])
err.putChild('admin', admin)

...

In auth.py:

class PublicHTMLRealm(object):
    implements(IRealm)

    def requestAvatar(self, avatarId, mind, *interfaces):
        if IResource in interfaces:
            resc = UpdateManager()
            resc.realm = self
            return (IResource, resc, lambda: None)
        raise NotImplementedError()

in admin.py:

class UpdateManager(resource.Resource):
    isLeaf = False
    pathFromRoot = '/service/admin'

    def __init__(self):
        resource.Resource.__init__(self)
        self.newFull = NewFullResource()
        self.putChild('new_full', self.newFull)
        self.newDelta = NewDeltaResource()
        self.putChild('new_delta', self.newDelta)
        self.switch = SwitchResource()
        self.putChild('switch', self.switch)
        self.putChild('', self)

    def render_GET(self, request):
        ...

Is anything wrong here in these code parts?
I have no errors shown in the console running with

twistd -ny server.tac

Thank you for your assistance,
Viatcheslav Gachkaylo
Crystalnix
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.