spring-projects / spring-projects/spring-framework
Support for Spring WebSession lifecycle tracking
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 60.2k
- Forks
- 38.8k
- Avg merge
- 5d 2h
- Merged PRs (30d)
- 27
Description
TL; DR;
Add support for callbacks for tracking the lifecycle of a WebSession in WebSessionStore.Foreword
We had a use case to track journey of a WebSession. We wanted to track various aspects of it like when it was created, retrieved, saved, invalidated etc.Problem
The session expires based on -- maxIdleTime limit reached, default is 30mins
- maxSessions limit reached, default is 10000
- invalidate was called
We wanted to distinguish the sessions which were removed due to inactivity for 30mins or maxSessions limit reached.
Currently there as no such hooks for any of the methods defined in WebSession interface to track the same.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the WebSession and WebSessionStore interfaces and inspect how session creation, retrieval, saving, invalidation, and expiration are currently handled. Determine how callbacks could distinguish inactivity, maxSessions eviction, and explicit invalidation, then add focused tests covering those lifecycle events and expiration causes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100