Asgard.Heimdall.JwtSigning 0.1.0

dotnet add package Asgard.Heimdall.JwtSigning --version 0.1.0
                    
NuGet\Install-Package Asgard.Heimdall.JwtSigning -Version 0.1.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="Asgard.Heimdall.JwtSigning" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Asgard.Heimdall.JwtSigning" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Asgard.Heimdall.JwtSigning" />
                    
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 Asgard.Heimdall.JwtSigning --version 0.1.0
                    
#r "nuget: Asgard.Heimdall.JwtSigning, 0.1.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 Asgard.Heimdall.JwtSigning@0.1.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=Asgard.Heimdall.JwtSigning&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Asgard.Heimdall.JwtSigning&version=0.1.0
                    
Install as a Cake Tool

Asgard.Heimdall.JwtSigning

Lightweight JWT signing for small Asgard-based projects.

This package is for projects that use the Asgard framework but do not want to hand-build JWT claims. It signs access tokens that follow the Asgard identity claim contract from Asgard.Abstractions.Identity.

What It Does

  • Issues JWT access tokens with Asgard-compatible claims.
  • Uses AsgardClaimTypes from Asgard.Abstractions.
  • Supports user tokens and backend service tokens.
  • Supports RSA signing and symmetric signing.
  • Produces JWKS metadata for the current signing key.

What It Does Not Decide

The application still owns its own identity logic:

  • login endpoint
  • password or external credential validation
  • role and permission lookup
  • refresh token behavior
  • token revocation or blacklist behavior
  • tenant-specific key storage or rotation

Those can be implemented by the application when needed. This package only prevents every small project from reimplementing the Asgard JWT shape by hand.

Basic Usage

var issuer = new AsgardJwtIssuer(new AsgardJwtSigningOptions
{
    Issuer = "https://auth.example.com",
    Audience = "asgard-api",
    KeyId = "main-key",
    RsaPrivateKeyPem = privateKeyPem,
    RsaPublicKeyPem = publicKeyPem
});

var token = issuer.Issue(new AsgardJwtSubject
{
    Subject = user.Id,
    UserId = user.Id,
    TenantId = tenantId,
    Roles = roles,
    Permissions = permissions,
    Scope = ["api"],
    UserMetadatas = userMetadatas,
    TenantMetadata = tenantMetadata
});

Backend Service Token

var token = issuer.Issue(new AsgardJwtSubject
{
    Subject = "orders-worker",
    ClientId = "orders-worker",
    TokenType = AsgardJwtConstants.BackendServiceTokenType,
    Scope = ["jobs.execute"]
});

Backend service tokens must include client_id and must not include user_id.

Use Asgard.Heimdall.JwtSigning.AspNetCore when you also want ASP.NET Core discovery and JWKS endpoints.

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 (1)

Showing the top 1 NuGet packages that depend on Asgard.Heimdall.JwtSigning:

Package Downloads
Asgard.Heimdall.JwtSigning.AspNetCore

ASP.NET Core discovery and JWKS endpoints for Asgard.Heimdall.JwtSigning.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 105 5/16/2026