【问题标题】:WsseAuthentication store nonce using RedisWsseAuthentication 使用 Redis 存储随机数
【发布时间】:2015-08-15 01:50:51
【问题描述】:

我无法弄清楚如何使用另一个缓存服务来使用 WsseAuthentication 存储我的 nonce。我不清楚文档。谁能帮我设置我的 nonce 缓存以与 Redis 一起使用?

目前,我知道如何添加新的 nonce 缓存服务 id,如下所示:

firewalls:
    #...
    wsse_secured:
        #...
        wsse:
            #...
            nonce_cache_service_id: cache_nonces

而且我知道如何创建此服务 ID:

services:
    cache_nonces:
        class: Doctrine\Common\Cache\RedisCache
        arguments: ???

但我不知道该给出什么论据。当我使用 RedisCache 时,它​​需要一个 Redis 对象,我不知道从哪里获取该对象并将其添加到参数中。

【问题讨论】:

    标签: symfony doctrine-orm redis redis-cache


    【解决方案1】:

    只要去掉“arguments:”,类Doctrine\Common\Cache\RedisCachehttps://github.com/doctrine/cache/blob/master/lib/Doctrine/Common/Cache/RedisCache.php没有构造函数,所以你不应该传递任何带有“arguments”的变量

    【讨论】:

    • 不起作用,它说不能对非对象执行 get(),我需要传递一些东西。可能是我提供的所有代码都不好。我不知道如何解决这个问题。
    • t 说不能做 get() - 你能发布关于错误的更详细的文本
    猜你喜欢
    • 1970-01-01
    • 2022-01-12
    • 2019-02-13
    • 2018-05-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-05
    相关资源
    最近更新 更多