File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,30 @@ const (
2626// State represents the state of a session.
2727type State uint8
2828
29+ /*
30+ /---> StateExpired
31+ StateCreated ---
32+ \---> StateRevoked
33+ */
34+
2935const (
36+ // StateCreated is the state of a session once it has been fully
37+ // committed to the Store and is ready to be used. This is the first
38+ // state of a session.
3039 StateCreated State = 0
31- StateInUse State = 1
40+
41+ // StateInUse is the state of a session that is currently being used.
42+ //
43+ // NOTE: this state is not currently used, but we keep it around for now
44+ // since old sessions might still have this state persisted.
45+ StateInUse State = 1
46+
47+ // StateRevoked is the state of a session that has been revoked before
48+ // its expiry date.
3249 StateRevoked State = 2
50+
51+ // StateExpired is the state of a session that has passed its expiry
52+ // date.
3353 StateExpired State = 3
3454)
3555
You can’t perform that action at this time.
0 commit comments