Class ClaimMapperProps

Assembly: redb.Identity.Core.dll

H5 (v1.0 DoD §5): PROPS Props for a declarative claim-mapping rule emitted into OAuth/OIDC tokens.

One rule produces one claim. A rule belongs to one of three scopes, expressed by
parent_id on the underlying object:
parent_id IS NULL — global rule, applied to every token.parent_id = ApplicationObjectId — per-application overlay rule, applied
only to tokens issued for that client.parent_id = ClaimScopeObjectId — rule belongs to a reusable Client Scope
(see ); applies to tokens issued for any Application
that has the scope assigned (see ).


Resolution model is similar to Keycloak Token Mappers (per-client + Client Scope mappers)
and WSO2IS Claim Configuration (per-Service-Provider claim selection over a global Dialect).
Per-rule destinations make application uniform across access_token, id_token
and the userinfo endpoint.

Base fields used: name = administrator-facing label (unique only within scope),
parent_id = scope discriminator (see above).

[RedbScheme("identity.claim_mapper")]
public class ClaimMapperProps

Inheritance

Object→ClaimMapperProps

Properties

ClaimType

Name of the claim emitted into the token (e.g. "department", "tenant_id").

public string? ClaimType { get; set; }

ConstantValue

Value emitted when = Constant. Ignored otherwise.

public string? ConstantValue { get; set; }

Description

Free-form admin description.

public string? Description { get; set; }

Destinations

Token destinations for the emitted claim. Valid values per OpenIddict:

public string[]? Destinations { get; set; }

Enabled

When false, the mapper is loaded but skipped at apply-time. Allows soft-disable

public bool Enabled { get; set; }

Order

Application order (ascending). When two mappers target the same ,

public int Order { get; set; }

Required

When true, a missing / null source value causes token issuance to fail with

public bool Required { get; set; }

RequiredScopes

Required OAuth scopes for this mapper to fire (subset semantics: ALL must be present

public string[]? RequiredScopes { get; set; }

SourceKind

Source of the value. One of:

public string? SourceKind { get; set; }

SourcePath

Path / key into the source. Dot-notation for UserProps, dictionary key for

public string? SourcePath { get; set; }