将“金字塔”命令添加到cubicweb ctl

cubicweb-pyramid的Python项目详细描述


将“金字塔”命令添加到cubicweb ctl”。

此多维数据集还添加CWSession实体类型,以便会话可以 存储在数据库中,允许运行cubicweb实例 无需设置会话存储(如redis或memcache) 解决方案。

但是,对于生产系统,建议使用 会话的存储解决方案。

会话的处理是通过金字塔来完成的(参见 pyramid’s documentation on sessions了解更多详细信息)。

例如,要设置基于redis的会话存储,您需要 pyramid-redis-session包,则必须将棱锥体配置为 通过在实例的 配置目录(靠近all-in-one.conf文件):

[main]cubicweb.defaults=no # we do not want to load the default cw session handlingcubicweb.auth.authtkt.session.secret=<secret1>cubicweb.auth.authtkt.persistent.secret=<secret2>cubicweb.auth.authtkt.session.secure=yescubicweb.auth.authtkt.persistent.secure=yesredis.sessions.secret=<secret3>redis.sessions.prefix=<my-app>:redis.sessions.url=redis://localhost:6379/0pyramid.includes=
        pyramid_redis_sessions
        pyramid_cubicweb.auth
        pyramid_cubicweb.login

有关详细信息,请参阅Pyramid Cubicweb的文档。

警告

如果您想登录cubicweb应用程序 在不安全的流上由金字塔服务(通常在 使用一个简单的 cubicweb-ctl pyramid -D-linfo myinstance,您 必须cubicweb.auth.authtkt.session.secure设置为 no

秘密

pyramid.ini中有许多机密要配置。他们 应该彼此不同,如Pyramid’s documentation中所述。

记录在案:

cubicweb.session.secret:
This secret is used to encrypt the session’s data ID (data themselved are stored in the backend, database or redis) when using the integrated (^{tt1}$ based) session data storage.
redis.session.secret:
This secret is used to encrypt the session’s data ID (data themselved are stored in the backend, database or redis) when using redis as backend.
cubicweb.auth.authtkt.session.secret:
This secret is used to encrypt the authentication cookie.
cubicweb.auth.authtkt.persistent.secret:
This secret is used to encrypt the persistent authentication cookie.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
jenkins在java代码的csv中使用前导零传递数字   终止java应用程序javaw。exe eclipse   java平均字长。文本   java在事务中关闭连接时会发生什么?   java如何为rich faces extendedDatatable启用可调整大小的列?   SpringJavaWebApp头nosniff不适合js和css文件   Java:抛出异常   java获取拒绝ArrayList中存在的用户名的代码。   关于编写JNDI服务提供者的java教程   java Android emulator电子书示例已停止   java如何防止双向关系中的循环   在Java中,如何将接口的实现作为变量传递给方法?   java有没有办法通过注释来监听CoreNLP处理的进度?   java Eclipse错误:导入项目时“无法读取项目描述文件”   java为什么findViewById返回null?