Object-Oriented Programming · Disney · Medium
Build a session manager responsible for the lifecycle of user session tokens. It must be able to create a new session for a user and hand back a token that is unique across every session it has ever issued. When a token is presented for validation, the manager decides whether it still refers to a live session. Expiry is sliding: each successful validation extends the session's lifetime, so a session only expires after a period with no activity. A token that has expired, or…