Class RegisteredClientOriginRegistry

Assembly: redb.Identity.Core.dll

Default implementation backed by
. Rebuilds its snapshot lazily on demand
after ; concurrent rebuilds are
de-duplicated via a so a burst of CORS preflights does not
trigger N parallel store scans.

public sealed class RegisteredClientOriginRegistry : IRegisteredClientOriginRegistry

Inheritance

Object→RegisteredClientOriginRegistry

Implements

Methods

GetAllowedOriginsAsync(CancellationToken)

Returns the current snapshot of allowed origins. Useful for diagnostics and tests.

public ValueTask<ImmutableHashSet<string>> GetAllowedOriginsAsync(CancellationToken ct = default)

Invalidate()

Marks the cached snapshot stale. The next call to will

public void Invalidate()

IsAllowedAsync(string?, CancellationToken)

Returns true if origin matches at least one registered client's

public ValueTask<bool> IsAllowedAsync(string? origin, CancellationToken ct = default)

Constructors