summaryrefslogtreecommitdiff
path: root/docs/api
diff options
context:
space:
mode:
Diffstat (limited to 'docs/api')
-rw-r--r--docs/api/exceptions.rst2
-rw-r--r--docs/api/httpexceptions.rst6
-rw-r--r--docs/api/interfaces.rst5
-rw-r--r--docs/api/renderers.rst4
-rw-r--r--docs/api/request.rst42
-rw-r--r--docs/api/session.rst8
6 files changed, 60 insertions, 7 deletions
diff --git a/docs/api/exceptions.rst b/docs/api/exceptions.rst
index ab158f18d..0c630571f 100644
--- a/docs/api/exceptions.rst
+++ b/docs/api/exceptions.rst
@@ -5,6 +5,8 @@
.. automodule:: pyramid.exceptions
+ .. autoclass:: BadCSRFToken
+
.. autoclass:: PredicateMismatch
.. autoclass:: Forbidden
diff --git a/docs/api/httpexceptions.rst b/docs/api/httpexceptions.rst
index 6a08d1048..b50f10beb 100644
--- a/docs/api/httpexceptions.rst
+++ b/docs/api/httpexceptions.rst
@@ -7,9 +7,9 @@
.. attribute:: status_map
- A mapping of integer status code to exception class (eg. the
- integer "401" maps to
- :class:`pyramid.httpexceptions.HTTPUnauthorized`).
+ A mapping of integer status code to HTTP exception class (eg. the integer
+ "401" maps to :class:`pyramid.httpexceptions.HTTPUnauthorized`). All
+ mapped exception classes are children of :class:`pyramid.httpexceptions`,
.. autofunction:: exception_response
diff --git a/docs/api/interfaces.rst b/docs/api/interfaces.rst
index 1dea5fab0..d8d935afd 100644
--- a/docs/api/interfaces.rst
+++ b/docs/api/interfaces.rst
@@ -50,7 +50,10 @@ Other Interfaces
.. autointerface:: IRendererInfo
:members:
- .. autointerface:: ITemplateRenderer
+ .. autointerface:: IRendererFactory
+ :members:
+
+ .. autointerface:: IRenderer
:members:
.. autointerface:: IViewMapperFactory
diff --git a/docs/api/renderers.rst b/docs/api/renderers.rst
index ea000ad02..0caca02b4 100644
--- a/docs/api/renderers.rst
+++ b/docs/api/renderers.rst
@@ -13,8 +13,12 @@
.. autoclass:: JSON
+ .. automethod:: add_adapter
+
.. autoclass:: JSONP
+ .. automethod:: add_adapter
+
.. attribute:: null_renderer
An object that can be used in advanced integration cases as input to the
diff --git a/docs/api/request.rst b/docs/api/request.rst
index 72abddb68..b7604020e 100644
--- a/docs/api/request.rst
+++ b/docs/api/request.rst
@@ -11,7 +11,9 @@
:exclude-members: add_response_callback, add_finished_callback,
route_url, route_path, current_route_url,
current_route_path, static_url, static_path,
- model_url, resource_url, set_property
+ model_url, resource_url, set_property,
+ effective_principals, authenticated_userid,
+ unauthenticated_userid, has_permission
.. attribute:: context
@@ -161,6 +163,42 @@
request, the value of this attribute will be ``None``. See
:ref:`matched_route`.
+ .. attribute:: authenticated_userid
+
+ .. versionadded:: 1.5
+
+ A property which returns the userid of the currently authenticated user
+ or ``None`` if there is no :term:`authentication policy` in effect or
+ there is no currently authenticated user. This differs from
+ :attr:`~pyramid.request.Request.unauthenticated_userid`, because the
+ effective authentication policy will have ensured that a record
+ associated with the userid exists in persistent storage; if it has
+ not, this value will be ``None``.
+
+ .. attribute:: unauthenticated_userid
+
+ .. versionadded:: 1.5
+
+ A property which returns a value which represents the *claimed* (not
+ verified) user id of the credentials present in the request. ``None`` if
+ there is no :term:`authentication policy` in effect or there is no user
+ data associated with the current request. This differs from
+ :attr:`~pyramid.request.Request.authenticated_userid`, because the
+ effective authentication policy will not ensure that a record associated
+ with the userid exists in persistent storage. Even if the userid
+ does not exist in persistent storage, this value will be the value
+ of the userid *claimed* by the request data.
+
+ .. attribute:: effective_principals
+
+ .. versionadded:: 1.5
+
+ A property which returns the list of 'effective' :term:`principal`
+ identifiers for this request. This will include the userid of the
+ currently authenticated user if a user is currently authenticated. If no
+ :term:`authentication policy` is in effect, this will return a sequence
+ containing only the :attr:`pyramid.security.Everyone` principal.
+
.. method:: invoke_subrequest(request, use_tweens=False)
.. versionadded:: 1.4a1
@@ -215,6 +253,8 @@
request provided by e.g. the ``pshell`` environment. For more
information, see :ref:`subrequest_chapter`.
+ .. automethod:: has_permission
+
.. automethod:: add_response_callback
.. automethod:: add_finished_callback
diff --git a/docs/api/session.rst b/docs/api/session.rst
index 31bc196ad..dde9d20e9 100644
--- a/docs/api/session.rst
+++ b/docs/api/session.rst
@@ -5,12 +5,16 @@
.. automodule:: pyramid.session
- .. autofunction:: UnencryptedCookieSessionFactoryConfig
-
.. autofunction:: signed_serialize
.. autofunction:: signed_deserialize
.. autofunction:: check_csrf_token
+ .. autofunction:: SignedCookieSessionFactory
+
+ .. autofunction:: UnencryptedCookieSessionFactoryConfig
+
+ .. autofunction:: BaseCookieSessionFactory
+