Asgard.AspNetCore.Core
4.0.0-preview.7
See the version list below for details.
dotnet add package Asgard.AspNetCore.Core --version 4.0.0-preview.7
NuGet\Install-Package Asgard.AspNetCore.Core -Version 4.0.0-preview.7
<PackageReference Include="Asgard.AspNetCore.Core" Version="4.0.0-preview.7" />
<PackageVersion Include="Asgard.AspNetCore.Core" Version="4.0.0-preview.7" />
<PackageReference Include="Asgard.AspNetCore.Core" />
paket add Asgard.AspNetCore.Core --version 4.0.0-preview.7
#r "nuget: Asgard.AspNetCore.Core, 4.0.0-preview.7"
#:package Asgard.AspNetCore.Core@4.0.0-preview.7
#addin nuget:?package=Asgard.AspNetCore.Core&version=4.0.0-preview.7&prerelease
#tool nuget:?package=Asgard.AspNetCore.Core&version=4.0.0-preview.7&prerelease
Asgard.AspNetCore.Core
Asgard.AspNetCore.Core provides the ASP.NET Core runtime integration for the Asgard framework.
What is included
- Tenant-aware middleware and tenant scope helpers
- Identity context accessors and default HTTP-based resolvers
- ASP.NET Core service registration helpers for Asgard runtime features
AsgardAuthruntime evaluation, DSL parsing, connector handling, and built-in authorization functions
Typical usage
Use this package when you are building an ASP.NET Core host on top of Asgard.Core.
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddAsgardContext();
builder.Services.AddAsgardAspNetCore();
var app = builder.Build();
app.UseAuthentication();
app.UseAsgardTenant();
app.UseAuthorization();
app.MapControllers();
AsgardAuth runtime
AddAsgardAspNetCore() now wires up the AsgardAuth runtime automatically:
AsgardAuthRequirementAsgardAuthHandler- metadata expression building for ordered
AsgardAuthAnd/AsgardAuthOr - DSL parsing for
AsgardAuthMatch - built-in functions:
contains,startsWith,exists - a default no-op
IAsgardAuthDataResolver
Business code only needs to place AsgardAuth* attributes on controllers or actions:
[Authorize]
[AsgardAuthAnyRole("admin")]
[AsgardAuthOr]
[AsgardAuthUserMetadataEquals("department", "platform")]
public ActionResult<string> Get()
=> Ok("ok");
You can extend the runtime with custom functions and a data resolver:
builder.Services.AddSingleton<IAsgardAuthFunction, CustomDepartmentFunction>();
builder.Services.AddSingleton<IAsgardAuthDataResolver, MyAsgardAuthDataResolver>();
More usage details and examples live in AsgardAuth.md.
Package role
Asgard.Abstractions: framework-wide contractsAsgard.Abstractions.AspNetCore: ASP.NET Core-facing contractsAsgard.Core: core implementationsAsgard.AspNetCore.Core: web runtime integrations and middleware
| 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.0.0-preview.7)
- Asgard.Abstractions.AspNetCore (>= 4.0.0-preview.7)
- Asgard.Core (>= 4.0.0-preview.7)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.3.9)
- Microsoft.Extensions.DependencyInjection (>= 10.0.5)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Asgard.AspNetCore.Core:
| Package | Downloads |
|---|---|
|
Asgard.Yggdrasil.AspNetCore
Asgard.Yggdrasil.AspNetCore 是 Asgard 框架的 ASP.NET Core 主机层,提供完整的 Web 应用程序启动模板,集成了Swagger、数据保护、日志和所有核心服务,帮助快速构建模块化应用。 |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 4.1.1 | 2 | 4/15/2026 |
| 4.1.0 | 37 | 4/14/2026 |
| 4.0.5 | 48 | 4/11/2026 |
| 4.0.4 | 52 | 4/10/2026 |
| 4.0.3 | 78 | 4/9/2026 |
| 4.0.2 | 98 | 4/8/2026 |
| 4.0.1 | 110 | 4/3/2026 |
| 4.0.0 | 115 | 4/1/2026 |
| 4.0.0-preview.7 | 53 | 3/31/2026 |
| 4.0.0-preview.6 | 49 | 3/30/2026 |
| 4.0.0-preview.5 | 137 | 3/28/2026 |
| 4.0.0-preview.4 | 52 | 3/27/2026 |
| 4.0.0-preview.3 | 49 | 3/27/2026 |
| 4.0.0-preview.2 | 42 | 3/27/2026 |
| 4.0.0-preview.1 | 50 | 3/27/2026 |