l.s.w.s.WebServicePublication(WebServicePublicationMixin, LaunchpadBrowserPublication) : class documentation

Part of lp.services.webapp.servers View In Hierarchy

The publication used for Launchpad web service requests.
Method constructPageID Add the web service named operation (if any) to the page ID.
Method getApplication See zope.publisher.interfaces.IPublication.
Method getResource Return the resource that can publish the object ob.
Method getPrincipal See LaunchpadBrowserPublication.

Inherited from LaunchpadBrowserPublication:

Method __init__ Undocumented
Method annotateTransaction See zope.app.publication.zopepublication.ZopePublication.
Method getDefaultTraversal Undocumented
Method beforeTraversal Undocumented
Method maybeRestrictToTeam Undocumented
Method getNonRestrictedURL Returns the non-restricted version of the request URL.
Method callObject See zope.publisher.interfaces.IPublication.
Method afterCall See zope.publisher.interfaces.IPublication.
Method finishReadOnlyRequest Hook called at the end of a read-only request.
Method callTraversalHooks We don't want to call _maybePlacefullyAuthenticate as does
Method afterTraversal See zope.publisher.interfaces.IPublication.
Method handleException Undocumented
Method beginErrorHandlingTransaction Hook for when a new view is started to handle an exception.
Method endRequest Undocumented
Method _maybePlacefullyAuthenticate This should never be called because we've excised it in
def constructPageID(self, view, context):
Add the web service named operation (if any) to the page ID.

See https://dev.launchpad.net/Foundations/Webservice for more information about WebService page IDs.

def getApplication(self, request):
See zope.publisher.interfaces.IPublication.

Always use the web service application to serve web service resources, no matter what application is normally used to serve the underlying objects.

def getResource(self, request, ob):
Return the resource that can publish the object ob.

This is done at the end of traversal. If the published object supports the ICollection, or IEntry interface we wrap it into the appropriate resource.

def getPrincipal(self, request):
See LaunchpadBrowserPublication.

Web service requests are authenticated using OAuth, except for the one made using (presumably) JavaScript on the /api override path.

Raises TokenException which has a webservice error status of Unauthorized - 401.

Raises Unauthorized directly in the case where the consumer is None for a non-anonymous request as it may represent a server error.

API Documentation for Launchpad, generated by pydoctor at 2020-07-03 00:00:04.