Skip to content

Abblix.Jwt.ReplayPrevention Namespace

Classes
DistributedReplayCacheA replay cache over the host's Microsoft.Extensions.Caching.Distributed.IDistributedCache: process-local when the host registers the in-memory distributed cache, shared when it registers Redis or another backend - so a scaled-out deployment gains one common memory by swapping the store, not the cache.
ReplayCacheBaseEverything a replay cache does apart from the one operation only its store can perform. A derived class supplies that operation - reserve this key if it is absent, and say whether it was - and inherits the rest: the freshness window turned into a lifetime and floored, the key namespaced, and the store's answer passed back as the verdict.
Interfaces
IReplayCacheRemembers the identifiers of single-use tokens so a second presentation of the same one can be told from the first. Every JWT profile that forbids replay needs this and needs it in the same shape - a DPoP proof (RFC 9449 Section 11.1), a client assertion (RFC 7523 Section 3) and a Security Event Token (RFC 8417 Section 2.2) differ in what they call the identifier and how long it stays interesting, never in the question they ask of the cache.