MemorySessionRevocationStore is a SessionRevocationStore that keeps its records in memory. It is safe for concurrent use. It only serves a single process: a session revoked by one server is still accepted by another, and by this one after a restart. Deployments with more than one server must use a
| 273 | // |
| 274 | // Expiry is judged by Clock. |
| 275 | type MemorySessionRevocationStore struct { |
| 276 | // Clock, if non-nil, is the time source for judging expiry. If nil, the |
| 277 | // real clock is used (through the deprecated saml.TimeNow). Set it |
| 278 | // before the store is used. |
| 279 | Clock *dsig.Clock |
| 280 | |
| 281 | mu sync.Mutex |
| 282 | maxEntries int |
| 283 | entries map[string]sessionRevocation |
| 284 | // nextExpiry is the earliest expiry in entries, or zero when it may be |
| 285 | // stale; no record can be dropped before it. |
| 286 | nextExpiry time.Time |
| 287 | } |
| 288 | |
| 289 | type sessionRevocation struct { |
| 290 | revokedAt, expiresAt time.Time |
nothing calls this directly
no outgoing calls
no test coverage detected