I have a web-application based on SpringBoot and using Spring Security for Log-in and Remember-Me, however Remember-Me doesn't work properly and resets after 1 hour of absense of interaction between client and server.
I have checked browser's storage for cookies, remember-me cookie is created and has correct expiration date (1 day after creation). The second cookie: JSESSION has expiration = session. And i think this is causing the problem.
+-------------+-----------+------+--------------------------------+
| Name | Domain | Path | Expires on |
+-------------+-----------+------+--------------------------------+
| JSESSIONID | 127.0.0.1 | / | session |
| remember-me | 127.0.0.1 | / | Tue, 25 Dec 2018 10:28:22 GMT |
+-------------+-----------+------+--------------------------------+
Here is my spring security configuration for remember-me:
.and()
.rememberMe()
.key("secretKey")
.tokenValiditySeconds(60*60*24)
.rememberMeParameter("remember-me");
I want that once person is logged in with remember-me option chosen, he/she will not need to log in again for next 24 hours. So is there possibility to set this JSESSION expiration equal to remember-me cookie? I use annotation driven Spring Boot