Franz.Common.Http.Identity 3.0.0

dotnet add package Franz.Common.Http.Identity --version 3.0.0
                    
NuGet\Install-Package Franz.Common.Http.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.Http.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.Http.Identity" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Franz.Common.Http.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.Http.Identity --version 3.0.0
                    
#r "nuget: Franz.Common.Http.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.Http.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.Http.Identity&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Franz.Common.Http.Identity&version=3.0.0
                    
Install as a Cake Tool

Franz.Common.Http.Identity

ASP.NET Core identity-context access backed by authenticated claims and validated tenant execution state.

Overview

This package provides the HTTP implementation of Franz identity access. It does not authenticate users itself. Authentication is configured by the host through ASP.NET Core or one of the provider registration extensions included in this package.

Installation

dotnet add package Franz.Common.Http.Identity

Register the identity context

using Franz.Common.Http.Identity.Extensions;

builder.Services.AddHttpIdentityContext();

Inject IIdentityContextAccessor into application services or endpoints:

app.MapGet("/whoami", (IIdentityContextAccessor identity) =>
{
    var current = identity.GetCurrentIdentity();

    return Results.Ok(new
    {
        current.UserId,
        current.Email,
        current.FullName,
        current.Roles,
        current.TenantId,
        current.DomainId
    });
});

The accessor reads user ID, email, display name, and roles only from an authenticated ClaimsPrincipal. Tenant and domain identifiers are read from ITenantExecutionContextAccessor, which is established by the validated tenant-resolution pipeline. Unauthenticated principals produce no user identity.

Authentication provider registration

The package includes optional provider-specific registration methods. Use only the provider required by the application:

Provider Registration method Configuration section
WS-Federation AddFranzWsFederationIdentity(configuration) FranzIdentity:WsFederation
OpenID Connect AddFranzOidcIdentity(configuration) FranzIdentity:Oidc
SAML 2.0 AddFranzSaml2Identity(configuration) FranzIdentity:Saml2
Keycloak (OIDC) AddFranzKeycloakIdentity(configuration) FranzIdentity:Keycloak

For example:

using Franz.Common.Http.Identity.Providers.OIDC;

builder.Services.AddFranzOidcIdentity(builder.Configuration);

Each provider extension configures ASP.NET Core authentication. These provider methods do not replace AddHttpIdentityContext(); register the identity accessor separately when the application needs IIdentityContextAccessor.

Provider configuration contains credentials and identity-provider metadata. Keep client secrets in a secret manager or protected deployment configuration; never commit real credentials.

Trust boundary

  • User identity is never inferred from arbitrary request headers.
  • A tenant claim is not, by itself, proof that the user belongs to the resolved tenant.
  • Tenant and domain identity are exposed only from the validated tenant execution context.
  • Use IHeaderContextAccessor for raw message/request header metadata; do not use it as an authentication source.
  • Franz.Common.Identity: provider-neutral identity contracts and models.
  • Franz.Common.Http.Authentication: strict symmetric JWT bearer configuration.
  • Franz.Common.Http.MultiTenancy: tenant resolution and request authorization.

License

MIT. See the repository 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.Http.Identity:

Package Downloads
Franz.Common.Http.Bootstrap

Shared utility library for the Franz Framework.

Franz.Common.SSO

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 96 11/10/2026
2.3.4 359 11/1/2026
2.3.3 316 10/28/2026
2.3.2 124 10/27/2026
2.3.1 177 10/26/2026
2.3.0 248 7/21/2026
2.2.19 162 7/19/2026
2.2.18 142 7/19/2026
2.2.17 151 7/12/2026
2.2.16 151 7/2/2026
2.2.15 158 6/29/2026
2.2.14 160 6/29/2026
2.2.13 145 6/29/2026
2.2.12 142 6/28/2026
2.2.11 141 6/28/2026
2.2.10 150 6/28/2026
2.2.9 155 6/28/2026
2.2.8 142 6/28/2026
2.2.7 153 6/7/2026
2.2.6 150 6/6/2026
Loading failed