diff options
| author | Michael Merickel <michael@digitalartefacts.com> | 2013-10-19 01:30:58 -0500 |
|---|---|---|
| committer | Michael Merickel <michael@digitalartefacts.com> | 2013-10-19 01:34:48 -0500 |
| commit | 8df7a71d99bbeb7819e8a2752012d51202669aa6 (patch) | |
| tree | 9aaf5abd5dd18f5a7c97ab3b6fc66b75dc7e04d1 /docs/narr | |
| parent | 63bf0587066216f9879ab188691579c9565f0340 (diff) | |
| download | pyramid-8df7a71d99bbeb7819e8a2752012d51202669aa6.tar.gz pyramid-8df7a71d99bbeb7819e8a2752012d51202669aa6.tar.bz2 pyramid-8df7a71d99bbeb7819e8a2752012d51202669aa6.zip | |
update the docs
Diffstat (limited to 'docs/narr')
| -rw-r--r-- | docs/narr/sessions.rst | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/docs/narr/sessions.rst b/docs/narr/sessions.rst index 358977089..1d914f9ea 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 |
