bouncer icon indicating copy to clipboard operation
bouncer copied to clipboard

Orphan tokens inside redis user id key?

Open luccasmaso opened this issue 8 years ago • 1 comments

Diving into some implementation codes of Bouncer I concluded that the redis design for storing the sessions is:

  1. [key] token - [value] JSON encoded with TTL
  2. [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.

luccasmaso avatar Feb 24 '17 03:02 luccasmaso

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.

ianwalter avatar Feb 24 '17 04:02 ianwalter