Skip to content

Enable setting custom id in RedisSession #1780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bjevtic opened this issue Jan 27, 2021 · 3 comments
Closed

Enable setting custom id in RedisSession #1780

bjevtic opened this issue Jan 27, 2021 · 3 comments
Labels
in: redis status: duplicate A duplicate of another issue

Comments

@bjevtic
Copy link

bjevtic commented Jan 27, 2021

Hi,
currently, when a RedisSession is created (inside RedisOperationsSessionRepository), its ID is set to a randomly picked UUID. I don't see a way to set a custom session ID afterwards (like we can do in MapSession.setId()), and class itself is package private and final, so it cannot be extended. Is there any way this can be done?

I see issues #11 and #204 are somewhat related to this.

Thanks

@bjevtic bjevtic added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Jan 27, 2021
@rwinch
Copy link
Member

rwinch commented Jan 28, 2021

Can I ask what is the reason you would like to customize the ID?

@rwinch rwinch added status: waiting-for-feedback We need additional information before we can continue in: redis and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 28, 2021
@bjevtic
Copy link
Author

bjevtic commented Jan 29, 2021

Sorry, I should have been clearer. One case I can think of is integration with existing session management systems, where we already have existing session id which we'd like to use, without resorting to something else. I see that some of the implementations allow setting id, like MapSession and MongoSession, and some don't (RedisSession and possibly Hazelcast and JdbcSession).
I have also found #1545 (much better explained) and have just upvoted it, so I guess this can be closed as a duplicate.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Jan 29, 2021
@eleftherias
Copy link
Contributor

Thanks @bjevtic. I will close this as a duplicate.

@eleftherias eleftherias added status: duplicate A duplicate of another issue and removed status: feedback-provided Feedback has been provided type: enhancement A general enhancement labels Feb 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: redis status: duplicate A duplicate of another issue
Projects
None yet
Development

No branches or pull requests

4 participants