Nedo.AspNet.Authentication.Claims
2.0.6
See the version list below for details.
dotnet add package Nedo.AspNet.Authentication.Claims --version 2.0.6
NuGet\Install-Package Nedo.AspNet.Authentication.Claims -Version 2.0.6
<PackageReference Include="Nedo.AspNet.Authentication.Claims" Version="2.0.6" />
<PackageVersion Include="Nedo.AspNet.Authentication.Claims" Version="2.0.6" />
<PackageReference Include="Nedo.AspNet.Authentication.Claims" />
paket add Nedo.AspNet.Authentication.Claims --version 2.0.6
#r "nuget: Nedo.AspNet.Authentication.Claims, 2.0.6"
#:package Nedo.AspNet.Authentication.Claims@2.0.6
#addin nuget:?package=Nedo.AspNet.Authentication.Claims&version=2.0.6
#tool nuget:?package=Nedo.AspNet.Authentication.Claims&version=2.0.6
Nedo.AspNet.Authentication.Claims
Claims transformation pipeline for the Nedo auth platform. Takes the raw claims an upstream IdP issued (Keycloak's realm_access.roles, Entra ID's groups / roles, Auth0's namespace-prefixed claims, Okta's groups, etc.) and normalizes them to the standard ClaimTypes.Role + cross-cutting concerns (tenant id, permissions, feature flags) so downstream [Authorize(Roles = "...")] and policy checks just work, regardless of which IdP minted the JWT.
Install
dotnet add package Nedo.AspNet.Authentication.Claims
This package is a transitive dependency of the four enterprise OIDC providers (Keycloak, EntraId, Auth0, Okta), so you usually don't install it directly — it comes along when you reference one of them.
Quickstart — register custom transformers
using Nedo.AspNet.Authentication.Claims;
public class TenantClaimsTransformer : INedoClaimsTransformer
{
public Task<IEnumerable<Claim>> TransformAsync(ClaimsTransformationContext context, CancellationToken ct)
{
// Pull tenant from the upstream JWT's "tid" claim and re-emit as "tenant".
var tid = context.Principal.FindFirst("tid")?.Value;
return Task.FromResult<IEnumerable<Claim>>(
tid is null ? Array.Empty<Claim>() : new[] { new Claim("tenant", tid) });
}
}
builder.Services.AddNedoClaimsTransformer<TenantClaimsTransformer>();
Multiple transformers chain in DI order; their claims concatenate.
What's in here
| Type | Purpose |
|---|---|
INedoClaimsTransformer |
Pluggable transformation step. |
ClaimsTransformationContext |
Per-call context (ClaimsPrincipal Principal, string Provider). |
| Provider-specific defaults | Built-in transformers shipped by each enterprise OIDC package map their idiomatic shape (Keycloak realm_access.roles → role, Entra groups → role, Auth0 namespace-prefixed claims, Okta groups → role). |
Docs
docs/05-claims-transformation.md — full guide including provider-specific defaults + custom-transformer recipes.
Related
| Package | What it normalizes |
|---|---|
Nedo.AspNet.Authentication.Keycloak |
realm_access.roles, resource_access.<client>.roles → role |
Nedo.AspNet.Authentication.EntraId |
App roles + groups → role |
Nedo.AspNet.Authentication.Auth0 |
Namespace-prefixed claims, RBAC permissions |
Nedo.AspNet.Authentication.Okta |
groups → role |
For per-mint claim addition (roles + tenant + user-types injected at JWT issue time on Local sign-ins), see IAccessTokenClaimsEnricher in Nedo.AspNet.Authentication.Local.
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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. |
-
net9.0
- Nedo.AspNet.Authentication.Abstractions (>= 2.0.6)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Nedo.AspNet.Authentication.Claims:
| Package | Downloads |
|---|---|
|
Nedo.AspNet.Authentication.Local
Local username/password authentication for Nedo.AspNet.Authentication with EF Core persistence. |
|
|
Nedo.AspNet.Authentication.Auth0
Auth0 authentication provider for Nedo.AspNet.Authentication. |
|
|
Nedo.AspNet.Authentication.Keycloak
Keycloak OIDC authentication provider for Nedo.AspNet.Authentication. |
|
|
Nedo.AspNet.Authentication.EntraId
Microsoft Entra ID (Azure AD) authentication provider for Nedo.AspNet.Authentication. |
|
|
Nedo.AspNet.Authentication.Okta
Okta authentication provider for Nedo.AspNet.Authentication. |
GitHub repositories
This package is not used by any popular GitHub repositories.