Cirreum.Runtime.AuthorizationProvider
1.0.9
dotnet add package Cirreum.Runtime.AuthorizationProvider --version 1.0.9
NuGet\Install-Package Cirreum.Runtime.AuthorizationProvider -Version 1.0.9
<PackageReference Include="Cirreum.Runtime.AuthorizationProvider" Version="1.0.9" />
<PackageVersion Include="Cirreum.Runtime.AuthorizationProvider" Version="1.0.9" />
<PackageReference Include="Cirreum.Runtime.AuthorizationProvider" />
paket add Cirreum.Runtime.AuthorizationProvider --version 1.0.9
#r "nuget: Cirreum.Runtime.AuthorizationProvider, 1.0.9"
#:package Cirreum.Runtime.AuthorizationProvider@1.0.9
#addin nuget:?package=Cirreum.Runtime.AuthorizationProvider&version=1.0.9
#tool nuget:?package=Cirreum.Runtime.AuthorizationProvider&version=1.0.9
Cirreum.Runtime.AuthorizationProvider
Base registration infrastructure for Cirreum authorization providers
Overview
Cirreum.Runtime.AuthorizationProvider provides the extension methods for registering authorization providers with ASP.NET Core applications. This is the runtime layer that defines the provider registration pattern and typically not referenced directly.
Note: For the complete authorization system with all provider implementations (Entra ID, API Key, Signed Request, External/BYOID), see Cirreum.Runtime.Authorization. Most applications should reference that package instead of this one directly.
Features
- Type-safe provider registration with generic constraints
- Configuration-driven setup using hierarchical configuration sections
- Multiple provider instances support per registrar type
- Duplicate registration protection with automatic detection
- Structured logging with deferred execution for performance
- Seamless ASP.NET Core integration through
IHostApplicationBuilderextensions
Installation
dotnet add package Cirreum.Runtime.AuthorizationProvider
Usage
Basic Registration
using Microsoft.Extensions.Hosting;
var builder = Host.CreateApplicationBuilder(args);
var authBuilder = builder.Services.AddAuthentication();
// Register your authorization provider
builder.RegisterAuthorizationProvider<MyAuthRegistrar, MyAuthSettings, MyInstanceSettings>(authBuilder);
var app = builder.Build();
Configuration Structure
Configure your authorization providers in appsettings.json:
{
"Cirreum": {
"Authorization": {
"Providers": {
"MyProvider": {
"Instances": [
{
"Name": "Primary",
"Endpoint": "https://auth.example.com",
"ClientId": "your-client-id"
}
]
}
}
}
}
}
Custom Authorization Provider
Implement your authorization provider by inheriting from the base classes:
public class MyAuthRegistrar : AuthorizationProviderRegistrar<MyAuthSettings, MyInstanceSettings>
{
public override ProviderType ProviderType => ProviderType.Authorization;
public override string ProviderName => "MyProvider";
public override void Register(
IServiceCollection services,
MyAuthSettings settings,
IConfigurationSection section,
AuthenticationBuilder authBuilder)
{
// Your registration logic here
}
}
Contribution Guidelines
Be conservative with new abstractions
The API surface must remain stable and meaningful.Limit dependency expansion
Only add foundational, version-stable dependencies.Favor additive, non-breaking changes
Breaking changes ripple through the entire ecosystem.Include thorough unit tests
All primitives and patterns should be independently testable.Document architectural decisions
Context and reasoning should be clear for future maintainers.Follow .NET conventions
Use established patterns from Microsoft.Extensions.* libraries.
Versioning
Cirreum.Runtime.AuthorizationProvider follows Semantic Versioning:
- Major - Breaking API changes
- Minor - New features, backward compatible
- Patch - Bug fixes, backward compatible
Given its foundational role, major version bumps are rare and carefully considered.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Cirreum Foundation Framework
Layered simplicity for modern .NET
| 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
- Cirreum.AuthorizationProvider (>= 1.0.15)
- Cirreum.Logging.Deferred (>= 1.0.106)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Cirreum.Runtime.AuthorizationProvider:
| Package | Downloads |
|---|---|
|
Cirreum.Runtime.Authorization
The Runtime Authorization configuration. |
GitHub repositories
This package is not used by any popular GitHub repositories.