Table of Contents

TryAddEntry Method

Definition

Namespace
Cuemon.AspNetCore.Authentication
Assemblies
Cuemon.AspNetCore.Authentication.dll
Source
src/Cuemon.AspNetCore.Authentication/MemoryNonceTracker.cs

TryAddEntry(string, int)

Attempts to insert a NonceTrackerEntry into the tracker.

public bool TryAddEntry(string nonce, int count)

Parameters

nonce string

The unique identifier of the tracker.

count int

The number or bit string that should be used only once.

Returns

bool

true if insertion succeeded; otherwise, false when there is already an entry in the tracker with the same key.

Exceptions

ArgumentNullException

nonce cannot be null.

ArgumentException

nonce cannot be empty or consist only of white-space characters.