将“金字塔”命令添加到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第三方库


热门话题
java HikariCP连接池Tomcat调试启用   java如何在javascript中访问JSON数组的元素?   jasper使用HttpServlet报告Java空白PDF   用于存储海量数据的java最佳集合   JBPM&springboot组织。流口水。坚持不懈jta。JtaTransactionManager在JNDI位置[java:comp/UserTransaction]未找到任何UserTransaction   java Grails maven插件需要Groovy 2.4.2   获取列表中访问最少的元素(Java 8)   java在IntelliJ中下载cn1lib不起作用   java Akka构造函数通过spring进行布线   swing在Java中创建JList时,如何更改条目的背景颜色?   为什么Java8Lambda允许访问非最终类变量?   javajavax。邮政MessaginException:无法连接到SMTP主机   java Android Webview高度在滚动后增加