Franz.Common.Messaging.Identity 3.0.0

dotnet add package Franz.Common.Messaging.Identity --version 3.0.0
                    
NuGet\Install-Package Franz.Common.Messaging.Identity -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Franz.Common.Messaging.Identity" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Franz.Common.Messaging.Identity" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Franz.Common.Messaging.Identity" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Franz.Common.Messaging.Identity --version 3.0.0
                    
#r "nuget: Franz.Common.Messaging.Identity, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Franz.Common.Messaging.Identity@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Franz.Common.Messaging.Identity&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Franz.Common.Messaging.Identity&version=3.0.0
                    
Install as a Cake Tool

Franz.Common.Messaging.Identity

Message-context identity access and authorization-header enrichment for Franz messaging envelopes.

Overview

Message-context identity access and authorization-header enrichment for Franz messaging envelopes.

Installation

dotnet add package Franz.Common.Messaging.Identity

Register the identity accessor

using Franz.Common.Messaging.Identity.Extensions;

services.AddMessagingIdentityContext();

This registers IIdentityContextAccessor as a scoped IdentityContextAccessor using the no-duplicate scoped registration helper.

Read identity from the current message

IdentityContextAccessor reads identity metadata from IMessageContextAccessor.Current.Message.Headers. It exposes:

  • GetCurrentEmail()
  • GetCurrentId()
  • GetCurrentFullName()
  • GetCurrentTenantId()
  • GetCurrentDomainId()
  • GetCurrentRoles()
  • GetCurrentIdentity()

User, tenant, and domain identifiers are parsed as GUIDs. Roles are returned as the string array stored in the message headers. Missing message context or missing headers produce null values or an empty role array. GetCurrentIdentity() returns null when there is no current message context; otherwise it constructs a FranzIdentityContext from the available fields.

Authorization header enrichment

AuthorizationMessageBuilder implements IMessageBuilder. It accepts an optional IHeaderContextAccessor. CanBuild returns true when that accessor is available. BuildAsync copies non-empty values from the current Authorization header into the outgoing message's headers.

The builder performs a memory copy and currently returns a completed task. It does not validate, refresh, or exchange the credential.

Security model

Authorization propagation is credential delegation. Only enable it when the downstream consumer is intended to act with the originating caller's authority. Define token audience, expiry, and trust boundaries explicitly; do not forward credentials to arbitrary brokers or downstream services. Avoid logging the Authorization header or persisting it in message payloads.

Package boundaries

This package adapts identity and header context to messaging. It does not authenticate the original HTTP request, authorize message handlers, or validate tenant ownership. Those responsibilities remain in the identity provider and consuming application.

License

MIT. See LICENSE.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Franz.Common.Messaging.Identity:

Package Downloads
Franz.Common.Messaging.Bootstrap

Shared utility library for the Franz Framework.

Franz.Common.Http.Messaging

Shared utility library for the Franz Framework.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 86 11/10/2026
2.3.4 360 11/1/2026
2.3.3 323 10/28/2026
2.3.2 134 10/27/2026
2.3.1 179 10/26/2026
2.3.0 198 7/21/2026
2.2.19 158 7/19/2026
2.2.18 152 7/19/2026
2.2.17 148 7/12/2026
2.2.16 169 7/2/2026
2.2.15 160 6/29/2026
2.2.14 159 6/29/2026
2.2.13 155 6/29/2026
2.2.12 146 6/28/2026
2.2.11 157 6/28/2026
2.2.10 150 6/28/2026
2.2.9 166 6/28/2026
2.2.8 151 6/28/2026
2.2.7 160 6/7/2026
2.2.6 159 6/6/2026
Loading failed