As additional funcvtionality for #24879 it's convenient to add support for propagating of session id changes to spring context. It's possible through the same HttpSessionEventPublisher used for session creation and destroy events. It's also necessary to add another HttpSessionEvent reflecting new type of event.

Comment From: wilkinsona

Thanks for the suggestion. Unfortunately, I'm not sure that I have understood what you are proposing we do in Spring Boot. Spring Security's HttpSessionEventPublisher is already an HttpSessionIdListener and, in response to a sessionIdChanged callback, it will publish a HttpSessionIdChangedEvent. This functionality was added in Spring Security 5.4.

Comment From: mahairod

Oh, sorry! My bad. I missed that functionality because it became available just few months ago.

Comment From: mahairod

Already present