Add the 'pyramid-session-secret' option to all-in-one.conf
authorChristophe de Vienne <christophe@unlish.com>
Thu, 18 Sep 2014 11:17:57 +0200
changeset 11635 fc4ecec311f4
parent 11634 fa614537e5ee
child 11636 2babe3694bed
Add the 'pyramid-session-secret' option to all-in-one.conf This value is used by pyramid_cubicweb to initialize the cookie factory.
site_cubicweb.py
--- a/site_cubicweb.py	Fri Sep 05 18:48:33 2014 +0200
+++ b/site_cubicweb.py	Thu Sep 18 11:17:57 2014 +0200
@@ -1,3 +1,15 @@
+from logilab.common.configuration import REQUIRED
+
 import cubicweb.schema
 
 cubicweb.schema.INTERNAL_TYPES.add('CWSession')
+
+options = (
+    ('pyramid-session-secret', {
+        'type': 'string',
+        'default': REQUIRED,
+        'help': 'Secret phrase to sign the session cookie',
+        'group': 'pyramid',
+        'level': 3
+    }),
+)