summaryrefslogtreecommitdiff
path: root/docs/narr/sessions.rst
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2013-10-20 13:54:27 -0400
committerChris McDonough <chrism@plope.com>2013-10-20 13:54:27 -0400
commit7d0b6ade3c77e4d512f193f86e074b94dc0ed8af (patch)
tree2e27851d6deda87aa2bb785c3847f72619b8f300 /docs/narr/sessions.rst
parentf4a890fa10e194651395bca08e20623e2cc5722a (diff)
parentd79087c78c273eec3118a23243b9b93d353b09f2 (diff)
downloadpyramid-7d0b6ade3c77e4d512f193f86e074b94dc0ed8af.tar.gz
pyramid-7d0b6ade3c77e4d512f193f86e074b94dc0ed8af.tar.bz2
pyramid-7d0b6ade3c77e4d512f193f86e074b94dc0ed8af.zip
Merge branch 'feature.signed-cookie-session'
Diffstat (limited to 'docs/narr/sessions.rst')
-rw-r--r--docs/narr/sessions.rst19
1 files changed, 9 insertions, 10 deletions
diff --git a/docs/narr/sessions.rst b/docs/narr/sessions.rst
index f33bc6132..fb5035373 100644
--- a/docs/narr/sessions.rst
+++ b/docs/narr/sessions.rst
@@ -43,24 +43,23 @@ limitations:
It is digitally signed, however, and thus its data cannot easily be
tampered with.
-You can configure this session factory in your :app:`Pyramid`
-application by using the ``session_factory`` argument to the
-:class:`~pyramid.config.Configurator` class:
+You can configure this session factory in your :app:`Pyramid` application
+by using the :meth:`pyramid.config.Configurator.set_session_factory`` method.
.. code-block:: python
:linenos:
- from pyramid.session import UnencryptedCookieSessionFactoryConfig
- my_session_factory = UnencryptedCookieSessionFactoryConfig('itsaseekreet')
-
+ from pyramid.session import SignedCookieSessionFactory
+ my_session_factory = SignedCookieSessionFactory('itsaseekreet')
+
from pyramid.config import Configurator
- config = Configurator(session_factory = my_session_factory)
+ config = Configurator()
+ config.set_session_factory(my_session_factory)
.. warning::
- Note the very long, very explicit name for
- ``UnencryptedCookieSessionFactoryConfig``. It's trying to tell you that
- this implementation is, by default, *unencrypted*. You should not use it
+ By default the :func:`~pyramid.session.SignedCookieSessionFactory`
+ implementation is *unencrypted*. You should not use it
when you keep sensitive information in the session object, as the
information can be easily read by both users of your application and third
parties who have access to your users' network traffic. And if you use this