auth.provider API
    Preparing search index...

    Interface RateLimitGuardOptions

    interface RateLimitGuardOptions {
        auditSink?: AuditSink;
        failMode: RateLimitFailMode;
        headerFallback?: RateLimitSpec;
        limiter: RateLimiter;
        logger?: Logger;
        tag: string;
    }
    Index
    auditSink?: AuditSink

    Structured-pipeline outage channel: when present the guard emits a rate_limit.unavailable audit event alongside the logger.error call (fire-and-forget via emitAuditEvent).

    OR-5: fail-mode policy for a limiter-backend outage, read from config.rateLimit.failMode — one policy for the product, not one per router. "open" lets the request through; "closed" returns 503.

    headerFallback?: RateLimitSpec

    Configured spec backing the RateLimit-Limit / RateLimit-Reset headers when the decision does not carry limit / resetAt. Callers with a documented per-endpoint spec (e.g. rateLimit.login) pass it here; without it the guard only advertises what the adapter actually reported, because a header value the caller invented is a limit no request is measured against.

    limiter: RateLimiter

    The shared limiter component the guarded route runs on.

    logger?: Logger

    Operator-visible outage channel. Defaults to consoleLogger.

    tag: string

    Endpoint tag: the key prefix (<tag>:ip:<ip>) by which an adapter resolves this route's spec, and the tag field on the guard's log and audit emissions. E.g. "token", "authorize", "introspect", "login".