Interface IRegisteredClientOriginRegistry

Assembly: redb.Identity.Contracts.dll

In-memory registry of allowed CORS origins derived from registered OAuth clients'
RedirectUris and PostLogoutRedirectUris. This is the runtime data source
used by the HTTP transport's per-route CORS resolver to authorise browser-initiated
requests to OIDC endpoints (token, userinfo, revocation, ...).

The registry is invalidation-driven, not TTL-driven: management operations
(Create/Update/Delete on applications) call
to mark the snapshot stale, and the next read repopulates from the underlying store.
There is no background refresh.


Origins are normalised to {scheme}://{host}[:{port}]. URIs whose authority cannot
be parsed are silently skipped — they are management-API validation failures, not CORS
failures.


Lives in redb.Identity.Contracts so that transport facades (HTTP, gRPC, ...) can
consume it without taking a compile-time reference to the Core implementation assembly.

public interface IRegisteredClientOriginRegistry

Methods

GetAllowedOriginsAsync(CancellationToken)

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

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

Invalidate()

Marks the cached snapshot stale. The next call to will

void Invalidate()

IsAllowedAsync(string?, CancellationToken)

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

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