Schemata.Authorization.Foundation
1.0.0-preview.24222.23
See the version list below for details.
dotnet add package Schemata.Authorization.Foundation --version 1.0.0-preview.24222.23
NuGet\Install-Package Schemata.Authorization.Foundation -Version 1.0.0-preview.24222.23
<PackageReference Include="Schemata.Authorization.Foundation" Version="1.0.0-preview.24222.23" />
paket add Schemata.Authorization.Foundation --version 1.0.0-preview.24222.23
#r "nuget: Schemata.Authorization.Foundation, 1.0.0-preview.24222.23"
// Install Schemata.Authorization.Foundation as a Cake Addin #addin nuget:?package=Schemata.Authorization.Foundation&version=1.0.0-preview.24222.23&prerelease // Install Schemata.Authorization.Foundation as a Cake Tool #tool nuget:?package=Schemata.Authorization.Foundation&version=1.0.0-preview.24222.23&prerelease
Schemata
Application Framework aims on modular business applications.
Quick Start
dotnet new web
dotnet add package --prerelease Schemata.Application.Complex.Targets
var builder = WebApplication.CreateBuilder(args)
.UseSchemata(schema => {
schema.UseLogging();
schema.UseDeveloperExceptionPage();
schema.ConfigureServices(services => {
services.AddTransient(typeof(IRepositoryAddAsyncAdvice<>), typeof(MyAdviceAddAsync<>));
services.AddRepository(typeof(MyRepository<>))
.UseEntityFrameworkCore<MyDbContext>((sp, options) => options.UseSqlServer(schema.Configuration.GetConnectionString("Default")));
services.AddDistributedMemoryCache();
});
schema.UseForwardedHeaders();
schema.UseHttps();
schema.UseCookiePolicy();
schema.UseSession();
schema.UseCors();
schema.UseRouting();
schema.UseControllers();
schema.UseJsonSerializer();
schema.UseModular();
schema.UseIdentity();
schema.UseAuthorization(options => {
options.AddEphemeralEncryptionKey()
.AddEphemeralSigningKey();
})
.UseCodeFlow()
.UseRefreshTokenFlow()
.UseDeviceFlow()
.UseIntrospection()
.UseCaching();
schema.UseWorkflow();
// You can also utilize UseAutoMapper() once you've incorporated the Schemata.Mapping.AutoMapper package into your project.
schema.UseMapster()
.Map<Source, Destination>(map => {
map.For(d => d.DisplayName).From(s => s.Name);
map.For(d => d.Age).From(s => s.Age).Ignore((s, d) => s.Age < 18);
map.For(d => d.Grade).Ignore()
.For(d => d.Sex).From(s => s.Sex.ToString());
});
schema.UseResource()
.MapHttp()
});
var app = builder.Build();
app.Run();
Fields
- DSL
- Modular
- Audit
- Authorization
- Datasource
- Event
- Identity
- Mapping
- Task
- Tenant
- Validation
- Workflow
Features
Features are modular components that can be integrated during the application startup process.
Each feature must implement the ISimpleFeature
interface.
Features are characterized by Order
and Priority
, both of which are Int32
values. The Order
determines the
sequence in which the ConfigureServices
methods are invoked. The Priority
establishes the sequence for invoking
the Configure<Application|Endpoints>
methods.
The range [0, 1_000_000_000)
and (2_147_000_000, 2_147_400_000]
for Order
and Priority
is reserved for built-in
features and Schemata extensions.
Built-in Features
A built-in feature can be activated by calling the UseXXX
method on the SchemataBuilder
instance. These features may
also have additional configuration methods.
Priority | Feature | Description |
---|---|---|
100_110_000 | Logging | Asp.Net Logging Middleware |
100_120_000 | HttpLogging | Asp.Net HTTP Logging Middleware |
100_130_000 | W3CLogging | Asp.Net W3C Logging Middleware |
110_000_000 | DeveloperExceptionPage | Asp.Net Developer Exception Page Middleware |
110_100_000 | ForwardedHeaders | Asp.Net Forwarded Headers Middleware |
120_000_000 | Https | Asp.Net HTTPS & HTTPS Redirection Middlewares |
130_000_000 | CookiePolicy | Asp.Net Cookie Policy Middleware |
140_000_000 | Routing | Asp.Net Routing Middleware |
141_100_000 | Quota | Asp.Net Rate Limiter Middleware |
150_000_000 | Cors | Asp.Net CORS Middleware |
160_000_000 | Authentication | Asp.Net Authentication & Authorization Middlewares |
170_000_000 | Session | Asp.Net Session Middleware |
210_000_000 | Controllers | Asp.Net MVC Middlewares, without Views |
210_100_000 | JsonSerializer | Configure System.Text.Json to use snake_case and handle JavaScript's 53-bits integers |
Extension Features
An extension feature can be activated in the same way as a built-in feature.
Priority | Package | Feature | Description |
---|---|---|---|
310_000_000 | Schemata.Identity.Foundation | Identity | Schemata Identity Foundation |
320_000_000 | Schemata.Authorization.Foundation | Authorization | Schemata Authorization Foundation |
340_000_000 | Schemata.Mapping.Foundation | Mapping | Schemata Mapper Foundation |
350_000_000 | Schemata.Workflow.Foundation | Workflow | Schemata Workflow Foundation |
360_000_000 | Schemata.Resource.Foundation | Resource | Schemata Resource Service |
360_100_000 | Schemata.Resource.Http | Resource (MapHttp ) |
Schemata Resource Service for HTTP |
2_147_400_000 | Schemata.Modular | Modular | Modularization |
Compliance
Schemata is designed to comply with .NET Standard 2.0, .NET Standard 2.1, and the two most recent .NET Long-Term Support (LTS) versions, which are .NET 6.0 and .NET 8.0 at the time of writing.
Some packages may have additional compliance requirements, which are documented below.
Package | Compliance |
---|---|
Schemata.DSL | |
Schemata.Core | |
Schemata.Modular | |
Schemata.Authorization.Foundation | |
Schemata.Identity.Foundation | |
Schemata.Mapping.Foundation | |
Schemata.Resource.Foundation | |
Schemata.Workflow.Foundation |
Schemata.Authorization.Foundation
Schemata Authorization Foundation is designed to comply with the OpenID Connect Core 1.0 specification.
Schemata.Identity.Foundation
Schemata Identity Foundation is designed to comply with Asp.Net Core Identity.
Additionally, we bring the Bearer Token Authentication Scheme and Core Identity API to platforms that do not support it.
Schemata.Mapping.Foundation
The Schemata Mapping Foundation is designed to be compatible with various mapping libraries, including AutoMapper and Mapster, among others.
It provides a unified interface for these libraries, enabling developers to switch between them without modifying their code.
Schemata.Workflow.Foundation
Unfortunately, the Schemata Workflow Foundation is not yet compliant with enterprise standards such as BPMN 2.0.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- OpenIddict.Server.AspNetCore (>= 5.4.0)
- OpenIddict.Validation.AspNetCore (>= 5.4.0)
- OpenIddict.Validation.ServerIntegration (>= 5.4.0)
- Schemata.Authorization.Skeleton (>= 1.0.0-preview.24222.23)
- Schemata.Core (>= 1.0.0-preview.24222.23)
- Schemata.Identity.Skeleton (>= 1.0.0-preview.24222.23)
-
net8.0
- OpenIddict.Server.AspNetCore (>= 5.4.0)
- OpenIddict.Validation.AspNetCore (>= 5.4.0)
- OpenIddict.Validation.ServerIntegration (>= 5.4.0)
- Schemata.Authorization.Skeleton (>= 1.0.0-preview.24222.23)
- Schemata.Core (>= 1.0.0-preview.24222.23)
- Schemata.Identity.Skeleton (>= 1.0.0-preview.24222.23)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Schemata.Authorization.Foundation:
Package | Downloads |
---|---|
Schemata.Application.Complex.Targets
Schemata Application Framework - Comprehensive Application Project Targets |
GitHub repositories
This package is not used by any popular GitHub repositories.