bouncer
bouncer copied to clipboard
Orphan tokens inside redis user id key?
Diving into some implementation codes of Bouncer I concluded that the redis design for storing the sessions is:
-
[key] token - [value] JSON encoded
with TTL -
[key] user_id - [value] list of tokens
Is that correct? If so, I was wondering what happens when a user token TTL expires. Redis automatically will handle the removal of 1. [key] token
. However, wouldn't the 2. [key] user_id
with that token become "orphan"?
Sorry if I missed out something and that is not the case.
I think you are probably right about that. It wasnt a pressing matter for me at the time I was working on this and then I had to start working on other projects so I never adressed this. I welcome PRs or ideas on how to address this, thank you.