InMemoryRedirectUriRegistry

A simple in-memory RedirectUriRegistry bounded against unauthenticated growth: each /register call is scoped under its server-issued registrationHandle, and when the number of live registrations exceeds the cap the oldest registration (and all its redirect URIs) is evicted as a unit. The cap is what keeps an unauthenticated POST /register flood from growing process memory without bound.

NOTE: even bounded, the unbounded-default in-memory backing is unsuitable for an internet-exposed multi-process proxy: state is per-process and lost on restart. Back it with shared, bounded storage (and gate /register behind the integrator's auth or a rate limiter) for such deployments.

Constructors

this
this(size_t maxRegistrations)

Construct with an explicit registration cap (used by tests to drive oldest-first eviction deterministically).

Members

Variables

defaultMaxRegistrations
enum size_t defaultMaxRegistrations;

Maximum number of live registrations (one per /register call). When exceeded on register, the oldest registration is evicted as a whole.

Inherited Members

From RedirectUriRegistry

register
void register(string registrationHandle, string[] redirectUris)

Persist the exact redirect_uris registered under registrationHandle.

isRegistered
bool isRegistered(string redirectUri)

Whether redirectUri is an exact-string member of ANY registered set.