Setu-TS
    Preparing search index...

    Interface IAuthorizationDiagnosticsSource

    Read-only authorization-diagnostics source — the surface the AuthPlugin registers under CAPABILITIES.AUTHORIZATION_DIAGNOSTICS and the DiagnosticsPlugin consumes to serve GET /v1/authorization.

    Synchronous by contract: read returns already-captured, frozen data and never evaluates a role, permission or wildcard, resolves a service, or mutates state. A source whose RBAC was not configured, whose registry lacks the identity predicate, or whose provider was replaced answers unsupported with the fixed coverage reason; one not opted into observation answers disabled.

    const source = ctx.services.get<IAuthorizationDiagnosticsSource>(
    CAPABILITIES.AUTHORIZATION_DIAGNOSTICS,
    );
    const batch = source.read(instanceId, 0, 128);

    0.8.0

    interface IAuthorizationDiagnosticsSource {
        read(
            instanceId: string,
            after: number,
            limit?: number,
        ): AuthorizationDiagnosticsBatch;
    }
    Index
    • Returns the retained decision explanations after after, oldest first.

      Parameters

      • instanceId: string

        The non-empty instance UUID to bind the batch to

      • after: number

        Source-local sequence cursor; 0 starts at the oldest retained decision

      • Optionallimit: number

        Maximum decisions to return, 1–128 (default 128)

      Returns AuthorizationDiagnosticsBatch

      A deeply frozen AuthorizationDiagnosticsBatch whose instanceId exactly equals the argument

      When instanceId is not a non-empty string, when after is not a non-negative safe integer, when limit is not an integer from 1 to 128, or when after is beyond the source's current sequence — with a fixed message that never echoes the value