我使用的是SecureSocial 2.0.7,我實現了一個UserServicePlugin,用戶可以登錄。我可以停止並重新啓動服務器(或者重新編譯),並且用戶將保持登錄狀態。升級到SecureSocial 2.0.12,現在會話沒有被持久
自升級到2.0.12以來,登錄會話在服務器重新啓動時不會持久。
我在UserServicePlugin
的每個方法中都添加了調試日誌記錄。用戶登錄時正在登錄saved
。但是,當服務器重新啓動,我試圖訪問一個頁面是以前登錄的用戶,我只看到在日誌中:
[info] play - database [default] connected at jdbc:postgresql://localhost/xxxxxx
[info] application - [securesocial] loaded templates plugin: sec.SecureSocialViews
[info] play - Starting application default Akka system.
[info] application - [securesocial] loaded user service: class sec.LoginUserService
[info] application - [securesocial] loaded password hasher bcrypt
[info] application - [securesocial] loaded identity provider: userpass
[info] play - Application started (Dev)
[debug] application - [securesocial] calling deleteExpiredTokens()
[debug] application - deleteExpiredTokens
[debug] application - [securesocial] anonymous user trying to access : '/supplier/requests'
任何想法?我想知道是否由於某種原因,登錄cookie正在獲取nuked之前,甚至檢查現有的登錄會話......
我使用用戶名/密碼認證。
難道這與SecureSocial將事物存儲在Play Cache中有什麼關係嗎? (我只是使用默認的內存播放緩存。) – andrewf
我在Play 2.1和Master分支Securesocial上也發現了這一點。我有一個數據庫支持的用戶服務,並配置了ehcache以堅持到磁盤。但是,在重新啓動服務器時,所有用戶都會註銷。令人沮喪。 –