From: Chuck E. <ec...@mi...> - 2000-08-24 23:46:57
|
Here's a little more info related to the authentication feature Dan is championing. The core logic of Application.dispatchRequest() is basically this part: ## ssPath = "server side path for the request's URL" if ssPath is None: self.handleBadURL(transaction) elif isdir(ssPath) and noslash(request.pathInfo()): # (*) see below self.handleDeficientDirectoryURL(transaction) elif self.isSessionIdProblematic(request): self.handleInvalidSession(transaction) else: self.handleGoodURL(transaction) So we basically hit one of these four methods: self.handleBadURL(transaction) self.handleDeficientDirectoryURL(transaction) self.handleInvalidSession(transaction) self.handleGoodURL(transaction) handleGoodURL() is literally: def handleGoodURL(self, transaction): self.createServletInTransaction(transaction) self.awake(transaction) self.respond(transaction) self.sleep(transaction) Perhaps it would be appropriate for the authentication plug-in to subclass Application, override handleGoodURL() and do the right thing regarding authentication, then call super. Or, since authentication is a pretty common and core concept to serving, we could explicitly provide a hook for it in handleGoodURL(), but the default handler would be a no-op and WebKit would define a basic Authenticator class to dictate the interface it expects. Thoughts? -Chuck |