MCPcopy Create free account
hub / github.com/crewjam/saml / MemorySessionRevocationStore

Struct MemorySessionRevocationStore

samlsp/session_revocation.go:275–287  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

273//
274// Expiry is judged by Clock.
275type 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
289type sessionRevocation struct {
290 revokedAt, expiresAt time.Time

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected