NewMemorySessionRevocationStore returns a MemorySessionRevocationStore that holds at most maxEntries unexpired records. It panics if maxEntries is not positive.
(maxEntries int)
| 296 | // that holds at most maxEntries unexpired records. It panics if maxEntries |
| 297 | // is not positive. |
| 298 | func 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. |
| 309 | func (s *MemorySessionRevocationStore) Revoke(_ context.Context, key string, revokedAt, expiresAt time.Time) error { |
no outgoing calls