diff options
Diffstat (limited to 'repoze/bfg/interfaces.py')
| -rw-r--r-- | repoze/bfg/interfaces.py | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/repoze/bfg/interfaces.py b/repoze/bfg/interfaces.py index 58a0e3257..595bce5c8 100644 --- a/repoze/bfg/interfaces.py +++ b/repoze/bfg/interfaces.py @@ -1,14 +1,10 @@ from zope.interface import Attribute from zope.interface import Interface -from zope.interface import implements from zope.deferredimport import deprecated from zope.component.interfaces import IObjectEvent -from webob import Request as WebobRequest - - deprecated( '(repoze.bfg.interfaces.ITemplate should now be imported ' 'as repoze.bfg.interfaces.ITemplateRenderer)', @@ -34,9 +30,9 @@ deprecated( ) class IRequestFactory(Interface): - """ A utility which generates a request factory """ + """ A utility which generates a request object """ def __call__(): - """ Return a request factory (e.g. a callable that accepts an + """ Return a request factory (a callable that accepts an environ and returns an object implementing IRequest, e.g. ``webob.Request``)""" @@ -191,3 +187,20 @@ class IContextNotFound(Interface): """ Interface implemented by contexts generated by code which cannot find a context during root finding or traversal """ +class INotFoundAppFactory(Interface): + """ A utility which returns a NotFound WSGI application factory """ + def __call__(): + """ Return a callable which returns a notfound WSGI + application. When the WSGI application is invoked, + a``message`` key in the WSGI environ provides information + pertaining to the reason for the notfound.""" + +class IUnauthorizedAppFactory(Interface): + """ A utility which returns an Unauthorized WSGI application + factory""" + def __call__(): + """ Return a callable which returns an unauthorized WSGI + application. When the WSGI application is invoked, a + ``message`` key in the WSGI environ provides information + pertaining to the reason for the unauthorized.""" + |
