i have a custom WebSessionIdResolver which is a cookie based web sesison like this:
@Bean
public WebSessionIdResolver webSessionIdResolver() {
CookieWebSessionIdResolver resolver = new CookieWebSessionIdResolver();
resolver.addCookieInitializer(responseCookieBuilder -> responseCookieBuilder.domain("mydomain.com"));
resolver.setCookieName("myCookieName");
resolver.setCookieMaxAge(Duration.ofSeconds(10));
return resolver;
}
Here i set the maxAge of the cookie to 10s, and when i load the page, i see the value is correctly set in the browser, let say the maxAge is 13:10:00. However when i reload the page or go to any other pages in my application, i still have the same sessionId but the maxAge is still 13:10:00, what i would like to archive is to have the maxAge updated by adding 10s to the current time, let say i did the reload at 13:15:00, then i would like to have the maxAge updated to 13:25:00. Can someone please give me a hint how could i archive that? Thank you