iya-sts
    Preparing search index...

    The per-realm half of SCIM's schemas: the realm's custom attributes as an extension, and the attribute policy's required attributes on the documents /Schemas and /ResourceTypes answer.

    Index
    • Parameters

      • deps: RealmSchemaDeps

        scimmy, the logger, the ambient realm, the attribute policy, the person editor's value check and the mapping

      Returns export=

    CUSTOM_SCHEMA: string = CUSTOM_SCHEMA

    The URN of the custom-attribute extension.

    • Writes what fromScim() found onto an attribute set: every name in the window is replaced, or removed where the resource gave no value.

      Parameters

      • attributes: Record<string, unknown>

        the attribute set about to be written; changed

      • converted: Converted

        what fromScim() answered

      Returns void

    • The ambient realm's custom attributes, read once per request.

      Returns Definition[]

      the definitions, by name

    • The custom-attribute extension, built once: a scimmy schema definition whose attributes are the ambient realm's.

      Returns any

      the schema definition, for User.extend()

    • The custom values a User write asks for, checked.

      WHAT "NOT SAID" MEANS DEPENDS ON THE METHOD, as it does for federationLinks (scim.ts): a create writes what it carries; a PATCH reaches the ingress as the whole resource egress drew, patched, so what it leaves is what is written; a PUT that does not name the extension leaves the values as they are — active's rule, so a provisioning client that never heard of this realm's attributes cannot erase them — and a PUT that names it replaces every one.

      Parameters

      • data: any

        the resource scimmy coerced

      • method: string

        the HTTP method

      • raw: unknown

        the request body as sent, for a PUT

      Returns Converted | { error: string }

      { window, values }, null when the values are left as they are, or { error } naming the value refused

    • Runs one SCIM request with the realm's register read at most once.

      Type Parameters

      • T

      Parameters

      • fn: () => T

        the request's work

      Returns T

      what fn returns

    • The answer of GET /ResourceTypes or GET /ResourceTypes/{id}, with the custom-attribute extension REQUIRED on the User type where this realm requires one of its attributes (RFC 7643 section 6).

      Parameters

      • answer: unknown

        a ListResponse or one resource type, as scimmy drew it

      Returns any

      a plain copy, marked

    • The answer of GET /Schemas or GET /Schemas/{id}, copied out of scimmy's objects and marked with what this realm requires.

      Parameters

      • answer: unknown

        a ListResponse or one schema document, as scimmy drew it

      Returns any

      a plain copy, marked

    • The extension's member of a User resource, drawn from the entry's attributes.

      Parameters

      • attributes: Record<string, unknown>

        the entry's attributes, any case of name

      Returns Record<string, unknown>

      the extension's object form, or null when the person holds no custom attribute

    • The dependencies this module uses outside a test.

      Parameters

      • SCIMMY: any

        the scimmy instance scim.ts declares its resources on

      Returns RealmSchemaDeps

      the dependencies