Class ClaimDefinitionProps

Assembly: redb.Identity.Core.dll

S2 — declarative claim schema. Defines a custom claim that may appear
on with optional server-side
validation (required / type / regex) and per-destination emit control.

Three orthogonal mechanisms in the identity pipeline:
Claim mappers () — translate
user attributes / groups into emitted claims at token issuance time.UserProps.CustomClaims — per-user value storage; what a
specific user actually has set.Claim definitions (this entity) — schema with required /
type / pattern; validated at user create / update time. Optional
auto-fills required claims that the
caller omitted, so a fresh user can never end up below schema.


Uniqueness: (, , )
is unique. A global definition for "external_user_id" is one row; an
application-specific override for the same name is a separate row keyed
by app id.

[RedbScheme("identity.claim_definition")]
public class ClaimDefinitionProps

Inheritance

Object→ClaimDefinitionProps

Properties

ApplicationId

FK to the application (Object id) when = "application". Null for global.

public long? ApplicationId { get; set; }

ClaimName

Claim key as it appears in and in

public string ClaimName { get; set; }

DefaultValue

Default value applied when the caller omits a required claim. When

public string? DefaultValue { get; set; }

Description

Operator-facing description / help text rendered as a field

public string? Description { get; set; }

DisplayName

Human-friendly label rendered next to the input on the user

public string? DisplayName { get; set; }

EmitOnAccessToken

When true (default), the claim is included on the issued access_token.

public bool EmitOnAccessToken { get; set; }

EmitOnIdToken

When true (default), the claim is included on the issued id_token.

public bool EmitOnIdToken { get; set; }

Required

When true, user create / update will be rejected with a 400

public bool Required { get; set; }

Scope

"global" — applies to every user.

public string Scope { get; set; }

Type

Value type — drives both the editor widget on the user profile UI and

public string Type { get; set; }

ValidationPattern

Optional regex pattern. Applied to the value (string form) at user

public string? ValidationPattern { get; set; }