Skip to main content

NonceOptions Class

Abblix.Oidc.Server

Abblix.Oidc.Server.Features.Nonces

NonceOptions Class

Base configuration class for the generic stateless-nonce service. Each feature that needs server-issued, time-bounded opaque tokens (DPoP-Nonce per RFC 9449 §8 / §9 is the current consumer; future candidates include state-parameter validation and challenge-response patterns) defines its own subclass — see DPoPNonceOptions — and adds its own slot under OidcOptions. This base governs only the primitive's own concerns: issuance window and secret-rotation cadence. Feature-specific policy (e.g. which DPoP endpoints require a nonce) lives on the corresponding subclass.

public class NonceOptions

Inheritance System.Object → NonceOptions

Derived
DPoPNonceOptions

Remarks

The nonce service is stateless: nonces themselves are not stored. Only a short-lived rotating HMAC secret lives in IDistributedCache, keyed by time bucket so multiple server instances can validate each other's nonces without coordination. Per RFC 9449 §11.3 a nonce mismatch is recoverable — the client receives a fresh nonce and retries — so the brief window during secret rotation where two instances disagree on the current secret degrades to a single client-side retry, not a hard failure.

Properties

NonceOptions.AcceptanceWindow Property

Maximum age of a server-issued nonce that the validator will still accept, measured against the timestamp embedded in the nonce. Defaults to 5 minutes — long enough to survive normal client clock skew and a retry round-trip, short enough that a leaked nonce stops being useful quickly.

public System.TimeSpan AcceptanceWindow { get; set; }

Property Value

System.TimeSpan

NonceOptions.RotationInterval Property

How often the HMAC secret used to sign nonces is rotated. Each rotation boundary becomes a new cache bucket; AcceptanceWindow MUST be larger than this so an in-flight nonce signed under the previous bucket's secret is still verifiable. Defaults to 2 minutes.

public System.TimeSpan RotationInterval { get; set; }

Property Value

System.TimeSpan