spring-projects / spring-projects/spring-session

SpringSessionBackedSessionInformation : why is the session not saved as a field?

Open
#927 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage
Dominant language
Java
Stars
1.9k
Forks
1.2k
Avg merge
4h 27m
Merged PRs (30d)
55

Description

I'm facing an issue where I would like to have access to the session itself in the SpringSessionBackedSessionInformation. However, when the session is passed as an argument to the constructor, it is not saved as a a field with a getter. So my alternative was to create my own SpringSessionBackedSessionRegistry and SpringSessionBackedSessionInformation class but the latter is package private...

My goal here is to have access to certain attributes in the session besides EXPIRED_ATTR and SPRING_SECURITY_CONTEXT.

Using version 2.0.0.RC1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with SpringSessionBackedSessionInformation and SpringSessionBackedSessionRegistry, focusing on the constructor and the requested access to session attributes beyond EXPIRED_ATTR and SPRING_SECURITY_CONTEXT. Check the public API and package visibility in version 2.0.0.RC1; done means establishing a supported way to access the session or clearly documenting why it is not available.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.