spring-projects / spring-projects/spring-session
Spring-Session-Hazelcast Question: How to change attributes of logged-in user in the session
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 55
Description
Hey everyone,
We are using spring-session-hazelcast (2.0.4.BUILD-SNAPSHOT) for session replication in our app cluster.
Now We have the following use case:
In our Session User (We created our own Class extending org.springframework.security.core.userdetails.User) we store different informations about our user.
Now this information can change. With spring-session-mongodb it was enough to get our user over the SecurityContextHolder.getAuthentication().getPrincipal() and set the changed attributes. But in HazelcastSessionRepository there is only a delta of the HazelcastSession saved. But the delta map is always empty.
So my question is: how can I force HazelcastSessionRepository to save my changes without need to relogin my user?
Thanks in advance
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 by tracing HazelcastSessionRepository's delta handling and compare it with the described SecurityContextHolder and spring-session-mongodb behavior. Determine how changes to the logged-in user's principal are detected and persisted without relogin; the issue does not mention a specific source file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100