Zwedze.Aetherweave.Security.Oidc
0.2.5
dotnet add package Zwedze.Aetherweave.Security.Oidc --version 0.2.5
NuGet\Install-Package Zwedze.Aetherweave.Security.Oidc -Version 0.2.5
<PackageReference Include="Zwedze.Aetherweave.Security.Oidc" Version="0.2.5" />
<PackageVersion Include="Zwedze.Aetherweave.Security.Oidc" Version="0.2.5" />
<PackageReference Include="Zwedze.Aetherweave.Security.Oidc" />
paket add Zwedze.Aetherweave.Security.Oidc --version 0.2.5
#r "nuget: Zwedze.Aetherweave.Security.Oidc, 0.2.5"
#:package Zwedze.Aetherweave.Security.Oidc@0.2.5
#addin nuget:?package=Zwedze.Aetherweave.Security.Oidc&version=0.2.5
#tool nuget:?package=Zwedze.Aetherweave.Security.Oidc&version=0.2.5
Aetherweave.Security.Oidc
Configuration-driven OIDC authentication for Blazor WebAssembly clients, with authorized HttpClient registration built on top of Zwedze.Aetherweave.Http.
Features
- One-Line Registration - Configure
AddOidcAuthenticationfromappsettings.jsoninstead of hand-wiringProviderOptions - Startup Validation - Missing or invalid configuration throws immediately via
Zwedze.Aetherweave.Core - Authorized HTTP Clients - Register Aetherweave typed HttpClients that automatically attach the OIDC access token
- Type-Safe Options -
AetherweaveOidcOptionsvalidated via data annotations
Installation
dotnet add package Zwedze.Aetherweave.Security.Oidc
Configuration (Aetherweave:Security:Oidc)
| Key | Notes |
|---|---|
Authority |
Required. The identity provider's URL |
ClientId |
Required. The registered client identifier |
ResponseType |
Required. OIDC response type, e.g. code |
DefaultScopes |
Required. Scopes requested on every sign-in |
RedirectUri |
Required. Post-login redirect, e.g. authentication/login-callback |
PostLogoutRedirectUri |
Required. Post-logout redirect, e.g. authentication/logout-callback |
{
"Aetherweave": {
"Security": {
"Oidc": {
"Authority": "https://identity.example.com",
"ClientId": "orders-web",
"ResponseType": "code",
"DefaultScopes": [ "openid", "profile", "orders-api" ],
"RedirectUri": "authentication/login-callback",
"PostLogoutRedirectUri": "authentication/logout-callback"
}
}
}
}
Quick Start
1. Register OIDC client authentication
builder.Services.AddAetherweaveOidcClientAuthentication(builder.Configuration);
// Or with a custom section name
builder.Services.AddAetherweaveOidcClientAuthentication(builder.Configuration, "MyApp:Oidc");
This reads and validates AetherweaveOidcOptions from configuration, then calls AddOidcAuthentication(...) mapping Authority, ClientId, ResponseType, RedirectUri, PostLogoutRedirectUri, and appending every entry of DefaultScopes to ProviderOptions.DefaultScopes.
2. Register authorized HttpClients
AddAetherweaveOidcHttpClients returns a builder whose typed clients are registered via Zwedze.Aetherweave.Http and automatically attach the current OIDC access token through AuthorizationMessageHandler.
builder.Services
.AddAetherweaveOidcHttpClients(authorizedUrls: ["https://api.example.com"])
.AddAetherweaveHttpClient<IOrderServiceClient, OrderServiceClient>(
builder.Configuration,
"OrderService");
authorizedUrls are the base addresses the access token is allowed to be attached to — pass the same URLs registered with AuthorizationMessageHandler (matches Blazor WebAssembly's standard WithAuthorizationMessageHandler set up in Program.cs).
3. Attach auth to any other IHttpClientBuilder
For clients not registered through AddAetherweaveOidcHttpClients, the WithAuth extension attaches the same handler directly:
builder.Services
.AddHttpClient<IOrderServiceClient, OrderServiceClient>()
.WithAuth(["https://api.example.com"]);
API Reference
| Member | Signature |
|---|---|
AddAetherweaveOidcClientAuthentication |
(this IServiceCollection, IConfiguration, string sectionName = "Aetherweave:Security:Oidc") → IServiceCollection |
AddAetherweaveOidcHttpClients |
(this IServiceCollection, IEnumerable<string> authorizedUrls, string sectionName = "Aetherweave:Security:Oidc") → OidcHttpClientBuilder |
OidcHttpClientBuilder.AddAetherweaveHttpClient<TInterface, TImplementation> |
(IConfiguration, string clientName) → IHttpClientBuilder — registers via Zwedze.Aetherweave.Http and attaches AuthorizationMessageHandler |
IHttpClientBuilder.WithAuth |
(IEnumerable<string> authorizedUrls) → IHttpClientBuilder — attaches AuthorizationMessageHandler to an existing builder |
| 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
- Microsoft.AspNetCore.Components.WebAssembly.Authentication (>= 10.0.10)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.10)
- Microsoft.Extensions.Http (>= 10.0.10)
- Zwedze.Aetherweave.Core (>= 0.2.5)
- Zwedze.Aetherweave.Http (>= 0.2.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.5 | 90 | 9/3/2026 |
| 0.2.5-pre.2 | 65 | 9/3/2026 |
| 0.2.5-pre.1 | 65 | 8/13/2026 |
| 0.2.5-extend-db-registratio... | 60 | 8/31/2026 |
| 0.2.4 | 106 | 8/13/2026 |
| 0.2.4-pre.1 | 71 | 8/13/2026 |
| 0.2.3 | 92 | 8/6/2026 |
| 0.2.3-pre.1 | 69 | 8/6/2026 |
| 0.2.2 | 102 | 8/5/2026 |
| 0.2.2-pre.1 | 61 | 7/30/2026 |
| 0.2.1 | 105 | 7/29/2026 |
| 0.2.1-pre.1 | 70 | 7/29/2026 |
| 0.2.0 | 109 | 7/25/2026 |
| 0.1.2-pre.3 | 66 | 7/25/2026 |
| 0.1.2-pre.1 | 64 | 7/24/2026 |