Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

setting session timeout in Grails Spring Security Core Plugin

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?

like image 865
Josh Diehl Avatar asked Jul 27 '12 15:07

Josh Diehl


1 Answers

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.

like image 124
Burt Beckwith Avatar answered Oct 16 '22 18:10

Burt Beckwith