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
<PackageReference Include="Asgard.Heimdall.JwtSigning" Version="0.1.0" />
<PackageVersion Include="Asgard.Heimdall.JwtSigning" Version="0.1.0" />
<PackageReference Include="Asgard.Heimdall.JwtSigning" />
paket add Asgard.Heimdall.JwtSigning --version 0.1.0
#r "nuget: Asgard.Heimdall.JwtSigning, 0.1.0"
#:package Asgard.Heimdall.JwtSigning@0.1.0
#addin nuget:?package=Asgard.Heimdall.JwtSigning&version=0.1.0
#tool nuget:?package=Asgard.Heimdall.JwtSigning&version=0.1.0
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
AsgardClaimTypesfromAsgard.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.
Related Package
Use Asgard.Heimdall.JwtSigning.AspNetCore when you also want ASP.NET Core discovery and JWKS endpoints.
| Product | Versions 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. |
-
net10.0
- Asgard.Abstractions (>= 4.1.4)
- Microsoft.IdentityModel.Tokens (>= 8.18.0)
- System.IdentityModel.Tokens.Jwt (>= 8.18.0)
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 |