Frodo Library - v5.0.0-36
    Preparing search index...

    Type Alias StaticUserMapping

    type StaticUserMapping = {
        createStaticUserMapping(
            mapping: StaticUserMappingSkeleton,
        ): Promise<StaticUserMappingSkeleton>;
        deleteStaticUserMapping(
            subject: string,
        ): Promise<StaticUserMappingSkeleton>;
        ensureStaticUserMapping(
            mapping: StaticUserMappingSkeleton,
        ): Promise<StaticUserMappingResult>;
        readStaticUserMapping(subject: string): Promise<StaticUserMappingSkeleton>;
        readStaticUserMappings(): Promise<StaticUserMappingSkeleton[]>;
        updateStaticUserMapping(
            mapping: StaticUserMappingSkeleton,
        ): Promise<StaticUserMappingSkeleton>;
    }
    Index
    • Make sure a subject has a static user mapping with at least the given roles, and change nothing that is there already: a missing mapping is created, the roles of an existing one are merged (never removed), other properties of an existing mapping are kept, and nothing is written when there is nothing to add. An existing mapping that names another local user (or another userRoles) is not changed: that would point the subject at a different identity, so the call fails, and updateStaticUserMapping is the explicit way.

      Parameters

      Returns Promise<StaticUserMappingResult>

      a promise that resolves to the resulting mapping and what was done