summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt8
-rw-r--r--docs/api/authentication.rst1
-rw-r--r--docs/api/interfaces.rst15
-rw-r--r--pyramid/authentication.py9
-rw-r--r--pyramid/authorization.py3
-rw-r--r--pyramid/interfaces.py25
6 files changed, 49 insertions, 12 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 768a08b0a..8235f53a5 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -13,6 +13,14 @@ Documentation
- The ``wiki2`` (SQLA+URL Dispatch) tutorial was updated slightly.
+- Make ``pyramid.interfaces.IAuthenticationPolicy`` and
+ ``pyramid.interfaces.IAuthorizationPolicy`` public interfaces, and refer to
+ them within the ``pyramid.authentication`` and ``pyramid.authorization``
+ API docs.
+
+- Render the function definitions for each exposed interface in
+ ``pyramid.interfaces``.
+
Features
--------
diff --git a/docs/api/authentication.rst b/docs/api/authentication.rst
index a6d4c1e18..bf7f8f8d5 100644
--- a/docs/api/authentication.rst
+++ b/docs/api/authentication.rst
@@ -18,6 +18,7 @@ Helper Classes
~~~~~~~~~~~~~~
.. autoclass:: AuthTktCookieHelper
+ :members:
diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst
index 3ce926230..54afdc830 100644
--- a/docs/api/interfaces.rst
+++ b/docs/api/interfaces.rst
@@ -21,21 +21,36 @@ Event-Related Interfaces
Other Interfaces
++++++++++++++++
+ .. autointerface:: IAuthenticationPolicy
+ :members:
+
+ .. autointerface:: IAuthorizationPolicy
+ :members:
+
.. autointerface:: IExceptionResponse
+ :members:
.. autointerface:: IRoute
+ :members:
.. autointerface:: IRoutePregenerator
+ :members:
.. autointerface:: ISession
+ :members:
.. autointerface:: ISessionFactory
+ :members:
.. autointerface:: IRendererInfo
+ :members:
.. autointerface:: ITemplateRenderer
+ :members:
.. autointerface:: IViewMapperFactory
+ :members:
.. autointerface:: IViewMapper
+ :members:
diff --git a/pyramid/authentication.py b/pyramid/authentication.py
index f1123c442..78349854b 100644
--- a/pyramid/authentication.py
+++ b/pyramid/authentication.py
@@ -67,6 +67,9 @@ class RepozeWho1AuthenticationPolicy(CallbackAuthenticationPolicy):
sequence of group identifiers (possibly empty) if the user
does exist. If ``callback`` is None, the userid will be
assumed to exist with no groups.
+
+ Objects of this class implement the interface described by
+ :class:`pyramid.interfaces.IAuthenticationPolicy`.
"""
implements(IAuthenticationPolicy)
@@ -150,6 +153,9 @@ class RemoteUserAuthenticationPolicy(CallbackAuthenticationPolicy):
of group identifiers (possibly empty) if the user does exist.
If ``callback`` is None, the userid will be assumed to exist with no
groups.
+
+ Objects of this class implement the interface described by
+ :class:`pyramid.interfaces.IAuthenticationPolicy`.
"""
implements(IAuthenticationPolicy)
@@ -257,6 +263,9 @@ class AuthTktAuthenticationPolicy(CallbackAuthenticationPolicy):
Default: ``True``. An auth_tkt cookie will be generated for the
wildcard domain.
Optional.
+
+ Objects of this class implement the interface described by
+ :class:`pyramid.interfaces.IAuthenticationPolicy`.
"""
implements(IAuthenticationPolicy)
def __init__(self,
diff --git a/pyramid/authorization.py b/pyramid/authorization.py
index ae20aabfd..ac8f195f2 100644
--- a/pyramid/authorization.py
+++ b/pyramid/authorization.py
@@ -55,6 +55,9 @@ class ACLAuthorizationPolicy(object):
is cleared for all principals encountered in previous ACLs. The
walking process ends after we've processed the any ACL directly
attached to ``context``; a set of principals is returned.
+
+ Objects of this class implement the
+ :class:`pyramid.interfaces.IAuthorizationPolicy` interface.
"""
implements(IAuthorizationPolicy)
diff --git a/pyramid/interfaces.py b/pyramid/interfaces.py
index 0f098f0f6..2364757ab 100644
--- a/pyramid/interfaces.py
+++ b/pyramid/interfaces.py
@@ -141,17 +141,6 @@ class IViewMapperFactory(Interface):
invocation signatures and response values.
"""
-# internal interfaces
-
-class IRequest(Interface):
- """ Request type interface attached to all request objects """
-
-IRequest.combined = IRequest # for exception view lookups
-
-class IRouteRequest(Interface):
- """ *internal only* interface used as in a utility lookup to find
- route-specific interfaces. Not an API."""
-
class IAuthenticationPolicy(Interface):
""" An object representing a Pyramid authentication policy. """
def authenticated_userid(request):
@@ -179,7 +168,7 @@ class IAuthenticationPolicy(Interface):
""" Return a set of headers suitable for 'remembering' the
principal named ``principal`` when set in a response. An
individual authentication policy and its consumers can decide
- on the composition and meaning of **kw. """
+ on the composition and meaning of ``**kw.`` """
def forget(request):
""" Return a set of headers suitable for 'forgetting' the
@@ -201,6 +190,18 @@ class IAuthorizationPolicy(Interface):
``pyramid.security.principals_allowed_by_permission`` API is
used."""
+
+# internal interfaces
+
+class IRequest(Interface):
+ """ Request type interface attached to all request objects """
+
+IRequest.combined = IRequest # for exception view lookups
+
+class IRouteRequest(Interface):
+ """ *internal only* interface used as in a utility lookup to find
+ route-specific interfaces. Not an API."""
+
class IStaticURLInfo(Interface):
""" A policy for generating URLs to static assets """
def add(name, spec, **extra):