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

Function NewMemorySessionRevocationStore

samlsp/session_revocation.go:298–306  ·  view source on GitHub ↗

NewMemorySessionRevocationStore returns a MemorySessionRevocationStore that holds at most maxEntries unexpired records. It panics if maxEntries is not positive.

(maxEntries int)

Source from the content-addressed store, hash-verified

296// that holds at most maxEntries unexpired records. It panics if maxEntries
297// is not positive.
298func NewMemorySessionRevocationStore(maxEntries int) *MemorySessionRevocationStore {
299 if maxEntries <= 0 {
300 panic(fmt.Sprintf("samlsp: NewMemorySessionRevocationStore: maxEntries must be positive, got %d", maxEntries))
301 }
302 return &MemorySessionRevocationStore{
303 maxEntries: maxEntries,
304 entries: map[string]sessionRevocation{},
305 }
306}
307
308// Revoke implements SessionRevocationStore.
309func (s *MemorySessionRevocationStore) Revoke(_ context.Context, key string, revokedAt, expiresAt time.Time) error {

Calls

no outgoing calls