iya-sts
    Preparing search index...

    The OpenID Connect scope claims (OIDC Core section 5.4), the gate that keeps a claim out of a token unless its scope was granted, and the two ways two sets of claims are combined (#395).

    Index
    COMBINE_ATTRIBUTES: Record<string, string> = COMBINE_ATTRIBUTES

    The application attribute choosing realm-vs-application, by set.

    DECLARABLE_CLAIMS: string[] = DECLARABLE_CLAIMS

    The claims a resource server may declare for its access tokens.

    REALM_MODES: string[] = REALM_MODES

    The values of a realm-vs-application combine attribute.

    RESOURCE_MODES: string[] = RESOURCE_MODES

    The values of oauthAccessTokenClaimsCombine.

    SCOPE_CLAIMS: Record<string, string[]> = SCOPE_CLAIMS

    OIDC Core section 5.4's claims, by scope.

    • The one resource-server mode for a token addressed to several: theirs when they agree, intersection — the most private — when they do not.

      Parameters

      • modes: string[]

        each declaring audience's mode

      Returns string

      the mode

    • Combines two lists of names: the realm's and an application's, under a realm-vs-application mode. own null is "the application holds none", which is the realm's whatever the mode.

      Parameters

      • realm: string[]

        the realm's names, in order

      • own: string[]

        the application's, or null

      • mode: string

        application, union, intersection or realm

      Returns string[]

      the names in force: the realm's order, then the application's additions

    • Combines the client's access-token claims with the claims a resource server declared. On a name both carry, the client's value is kept: it is what an administrator configured for this client, and the declaration says only which standard claim is wanted.

      Parameters

      • client: any

        the client's claims

      • resource: any

        the resource server's, already resolved and gated

      • mode: string

        union, intersection, client or resource

      Returns any

      a new object

    • Removes from a set of claims every section 5.4 claim whose scope the grant does not include. A claim no scope covers is kept. The object is changed in place and returned.

      Parameters

      • claims: any

        the claims about to be issued

      • grantedScope: unknown

        the scope GRANTED (before RFC 9068's plan took the OpenID Connect scopes off an access token for an API)

      • where: string

        what is being issued, for the log

      • OptionalalsoGranted: string[]

        claim names granted another way: by a resource server's own permission that maps them, which is itself a grant

      Returns any

      the same object, without what was not granted

    • Says whether a scope string includes a value.

      Parameters

      • scope: unknown

        the space-separated scope

      • value: string

        the value

      Returns boolean

      whether it does

    • The claims several resource servers declared, for one token addressed to all of them: only what EVERY one declared (rcbj, 2026-10-09), so no resource server is handed an attribute it did not ask for. An audience that declared nothing contributes nothing, and so empties the result.

      Parameters

      • declared: string[][]

        each audience's declared names

      Returns string[]

      the names every one declared

    • Reads a combine mode, answering the default for a value outside the set (the write refuses one; a value stored past it is not honoured).

      Parameters

      • value: unknown

        the stored value

      • modes: string[]

        the values allowed

      • fallback: string

        the default

      Returns string

      the mode

    • Returns an application's realm-vs-application combine mode for a set, or '' when it holds none (each half then keeps #495's rule).

      Parameters

      • setId: unknown

        the claim set id

      • application: any

        the application's view, or null

      Returns string

      the mode, or ''

    • Says which section 5.4 scope covers a claim.

      Parameters

      • claim: unknown

        the claim name

      Returns string

      the scope, or '' for a claim no scope covers