Document Kubernetes Kit backend session expiration policy#4144
Document Kubernetes Kit backend session expiration policy#4144MatthewVaadin merged 14 commits intolatestfrom
Conversation
|
|
||
| == Backend Session Expiration Policy | ||
|
|
||
| Backend session expiration policy allows to define an expiration timeout for the backend stored session. By default no expiration is set, but can be expiration can be activated setting the property or by providing a custom SessionExpirationPolicy bean. If no unit is provided in the property, seconds are assumed. |
There was a problem hiding this comment.
By implementing the SessionExpirationPolicy interface, the developer can define the expiration timeout.
However, the property does not define the timeout value, but the amount of time to be added to the HTTP session timeout to determine the expiration of the backend session. If time unit is not given, milliseconds is assumed.
There was a problem hiding this comment.
It would be nice to add also a SessionExpirationPolicy implementation example
There was a problem hiding this comment.
Thanks for clarification
There was a problem hiding this comment.
Should this suffice for code example?
@Bean
SessionExpirationPolicy sessionExpirationPolicy() {
return Duration.ofMinutes(60);
}
There was a problem hiding this comment.
The SessionExpirationPolicy.apply() method takes current HTTP session timeout as argument
@Bean
SessionExpirationPolicy sessionExpirationPolicy() {
return sessionTimeout -> Duration.ofMinutes(60);
}
There was a problem hiding this comment.
If time unit is not given, milliseconds is assumed.
This may be the default, but it's not particularly useful. If seconds are more appropriate, perhaps the property should be annotated with @DurationUnit(ChronoUnit.SECONDS) and the original phrasing kept?
Co-authored-by: Matthew Wilson <98319962+MatthewVaadin@users.noreply.github.com>
Co-authored-by: Marco Collovati <marco@vaadin.com>
Co-authored-by: Marco Collovati <marco@vaadin.com>
Co-authored-by: Marco Collovati <marco@vaadin.com>
|
Are these docs scheduled for publishing anytime soon ? |
Co-authored-by: Jorg Heymans <jorg.heymans@gmail.com>
AI Language ReviewThe newly added section on "Backend Session Expiration Policy" is clear and well-structured. The example code is correctly formatted, and the explanation is understandable. There are no issues requiring improvement. |
|
@MatthewVaadin do you think it is ok to merge? |
|
I'm still concerned that we don't have consistency across the examples, or an explanation that the Java example works differently than the other two. In my "resolved" review I proposed a fix that already included the corrected spelling mistake, along with a layout that allows a description for each example without resorting to in-example comments. |
See: https://github.com/vaadin/kubernetes-kit/pull/163/files