SessionRevocationStore records revoked sessions for a CookieSessionProvider. Each record has a key, which names either every session of a user or the sessions of a user with a given SessionIndex, and a time: sessions with that key issued at or before it are revoked. Implementations must be safe for
| 112 | // |
| 113 | // Keys are at most 80 bytes of ASCII letters, digits and colons. |
| 114 | type SessionRevocationStore interface { |
| 115 | // Revoke records that the sessions with key issued at or before |
| 116 | // revokedAt are revoked. If key is already recorded, the later of the |
| 117 | // two times is kept. The record is needed until expiresAt, when every |
| 118 | // such session has expired, and may be dropped after that. |
| 119 | Revoke(ctx context.Context, key string, revokedAt, expiresAt time.Time) error |
| 120 | |
| 121 | // RevokedAt returns the time recorded for key, or the zero time if |
| 122 | // none is recorded (or its record has expired). |
| 123 | RevokedAt(ctx context.Context, key string) (time.Time, error) |
| 124 | } |
| 125 | |
| 126 | // nameIDRevocationKey returns the revocation key of every session of the |
| 127 | // user whose NameID has the value nameID. |
no outgoing calls
no test coverage detected