在Grails Spring Security Core Plugin中设置会话超时 [英] setting session timeout in Grails Spring Security Core Plugin

查看:104
本文介绍了在Grails Spring Security Core Plugin中设置会话超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尽管搜索插件文档和一般搜索,但我找不到这个答案。我得到的最接近的是这个页面,这似乎描述了设置Tomcat超时。有一整段名为配置设置现在在Config.groovy的插件文档,有没有办法为插件配置超时而不涉及容器的设置? >解决方案

该插件没有会话持续时间的设置 - 它只是使用为整个应用程序配置的任何内容。你可以通过编辑web.xml(如果你还没有运行 grails install-templates 并编辑 src / templates / war / web .XML 。添加

 < session-config> 
< session-timeout> 30< / session-timeout>
< / session-config>

welcome-file-list 元素之前并将会话超时值设置为您希望的分钟数。


Despite searching the plugin docs and general searching, I can't find an answer to this one. The closest I've gotten is the end of this page, which seems to describe setting a Tomcat timeout. There is an entire section of the plugin docs titled "Configuration Settings Now in Config.groovy", is there no way to configure timeout for the plugin without involving the container's settings?

解决方案

The plugin doesn't have settings for session duration - it just uses whatever is configured for the whole app. You can do this by editing web.xml (run grails install-templates if you haven't yet) and edit src/templates/war/web.xml. Add

<session-config>
   <session-timeout>30</session-timeout>
</session-config>

before the welcome-file-list element and set the session-timeout value to whatever number of minutes you want it to be.

这篇关于在Grails Spring Security Core Plugin中设置会话超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆