使用securesocial的无休止会话

时间:2014-04-17 14:04:18

标签: playframework playframework-2.2 securesocial

我正在使用Play 2.2和SecureSocial 2.1.3我已经拥有所有登录/注册工作流程,但我不知道如何让用户永远记录 和非到期会议。我读了documentation并且它没有说明这一点,但也许我错过了一些东西。

这是我的securesocial.conf(我将makeTrasient设置为true以在浏览器关闭后保留cookie)

cookie {
        #name=coalition
        #path=/
        #domain=some_domain
        httpOnly=true
        idleTimeoutInMinutes=30
        absoluteTimeoutInMinutes=720
        makeTransient=false

}   

我也有自定义,以避免在重新加载应用程序后登录

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd" updateCheck="false">
<diskStore path="java.io.tmpdir"/>
<defaultCache
        maxElementsInMemory="10000"
        eternal="false"
        timeToIdleSeconds="120"
        timeToLiveSeconds="120"
        overflowToDisk="false"
        maxElementsOnDisk="10000000"
        diskPersistent="true"
        diskExpiryThreadIntervalSeconds="120"
        memoryStoreEvictionPolicy="LRU"
/> 

此类Web应用程序中的用户只需登录一次就可以获得更多的好处,而不是每次访问网站时重新登录,或者在会话到期时每 XXXX 分钟。

提前致谢!

1 个答案:

答案 0 :(得分:0)

我认为这会回答你的问题。 https://github.com/jaliss/securesocial/issues/377