Class t.w.a.w.HTTPAuthResource(object):

Part of twisted.web2.auth.wrapper View Source View In Hierarchy

Implements interfaces: twisted.web2.iweb.IResource
I wrap a resource to prevent it being accessed unless the authentication can be completed using the credential factory, portal, and interfaces specified.
Method __init__
Method login Undocumented
Method authenticate Undocumented
Method locateChild Locate another object which can be adapted to IResource.
Method renderHTTP Return an IResponse or a deferred which will fire an
def __init__(self, wrappedResource, credentialFactories, portal, interfaces): (source)
ParameterswrappedResourceA twisted.web2.iweb.IResource to be returned from locateChild and render upon successful authentication.
credentialFactoriesA list of instances that implement ICredentialFactory. (type: list )
portalPortal to handle logins for this resource. (type: twisted.cred.portal.Portal )
interfacesthe interfaces that are allowed to log in via the given portal (type: tuple )
def login(self, factory, response, req): (source)
Undocumented
def authenticate(self, req): (source)
Undocumented
def locateChild(self, req, seg): (source)
Locate another object which can be adapted to IResource.
Returns

A 2-tuple of (resource, remaining-path-segments), or a deferred which will fire the above.

Causes the object publishing machinery to continue on with specified resource and segments, calling the appropriate method on the specified resource.

If you return (self, server.StopTraversal), this instructs web2 to immediately stop the lookup stage, and switch to the rendering stage, leaving the remaining path alone for your render function to handle.
def renderHTTP(self, req): (source)
Return an IResponse or a deferred which will fire an IResponse. This response will be written to the web browser which initiated the request.
API Documentation for twisted, generated by pydoctor.