Setu-TS
    Preparing search index...

    Interface IGrantSource

    A source of scoped role grants — a repository, a directory, an identity provider. Several sources are UNIONED; a source that rejects, throws or exceeds its deadline makes the whole check deny.

    Every returned value is validated and copied by the evaluator; an invalid grant is dropped, never coerced.

    The answer is SHARED between every credential of one principal: AuthPlugin memoises, coalesces and caches it by the principal's id and iss claim. So the principal a source receives carries only those two fields — no other claims, roles or permissions, which come from the credential and can differ between two tokens for the same user. Grants derived from the credential belong in AuthPlugin's claims source, which is mapped per credential.

    0.9.0

    interface IGrantSource {
        name: string;
        grantsFor(
            principal: IPrincipal,
            query: GrantQuery,
            signal: AbortSignal,
        ): Promise<readonly ScopedGrant[]>;
    }
    Index
    name: string

    A short name for the source, used in log records. Never a secret.