Table of Contents

Struct MessageSecurity

Namespace
Excalibur.Dispatch.Metadata
Assembly
Excalibur.Dispatch.dll

Focused value type grouping the security and tenancy metadata for a message.

public readonly record struct MessageSecurity : IEquatable<MessageSecurity>
Implements
Inherited Members
Extension Methods

Remarks

Composed onto MessageMetadata. Carries the user, role, claim and tenant fields. Holds at most ten properties to satisfy the Microsoft-first focused-value-type design guideline.

Constructors

MessageSecurity()

Initializes a new instance of the MessageSecurity struct with empty role and claim collections.

public MessageSecurity()

Properties

Claims

Gets the collection of security claims associated with the message.

public IReadOnlyCollection<Claim> Claims { get; init; }

Property Value

IReadOnlyCollection<Claim>

The security claims. Never null; defaults to an empty collection.

Roles

Gets the collection of user roles associated with the message.

public IReadOnlyCollection<string> Roles { get; init; }

Property Value

IReadOnlyCollection<string>

The user roles. Never null; defaults to an empty collection.

TenantId

Gets the tenant identifier for multi-tenant scenarios.

public string? TenantId { get; init; }

Property Value

string

The tenant identifier or null.

UserId

Gets the identifier of the user associated with the message.

public string? UserId { get; init; }

Property Value

string

The user identifier or null.