Table of Contents

Interface IReplayCache

Namespace
Fdyay.IdentityServer.Services
Assembly
Fdyay.IdentityServer.Core.dll

Remembers values that must not be accepted twice.

public interface IReplayCache

Remarks

A DPoP proof is a signature over the request it was made for, and nothing in the signature stops it being sent again. The jti is what makes a second use recognisable, and this is where it is remembered — for as long as the proof would still be timely, which is what bounds how much has to be kept.

A signed CIBA request is the same problem in a different envelope, and since 0.76.0 its jti is remembered here too, under its own purpose.

Methods

AddAsync(string, string, DateTimeOffset, CancellationToken)

Records handle as used, until expiration.

Task AddAsync(string purpose, string handle, DateTimeOffset expiration, CancellationToken cancellationToken = default)

Parameters

purpose string
handle string
expiration DateTimeOffset
cancellationToken CancellationToken

Returns

Task

ExistsAsync(string, string, CancellationToken)

Whether handle has been recorded and has not yet expired.

Task<bool> ExistsAsync(string purpose, string handle, CancellationToken cancellationToken = default)

Parameters

purpose string
handle string
cancellationToken CancellationToken

Returns

Task<bool>