Zwedze.Aetherweave.Security.ClientCredentials
0.2.5
dotnet add package Zwedze.Aetherweave.Security.ClientCredentials --version 0.2.5
NuGet\Install-Package Zwedze.Aetherweave.Security.ClientCredentials -Version 0.2.5
<PackageReference Include="Zwedze.Aetherweave.Security.ClientCredentials" Version="0.2.5" />
<PackageVersion Include="Zwedze.Aetherweave.Security.ClientCredentials" Version="0.2.5" />
<PackageReference Include="Zwedze.Aetherweave.Security.ClientCredentials" />
paket add Zwedze.Aetherweave.Security.ClientCredentials --version 0.2.5
#r "nuget: Zwedze.Aetherweave.Security.ClientCredentials, 0.2.5"
#:package Zwedze.Aetherweave.Security.ClientCredentials@0.2.5
#addin nuget:?package=Zwedze.Aetherweave.Security.ClientCredentials&version=0.2.5
#tool nuget:?package=Zwedze.Aetherweave.Security.ClientCredentials&version=0.2.5
Aetherweave.Security.ClientCredentials
Backend-to-backend authentication: your service calling other APIs as itself, with no user involved
(OAuth2 client credentials). Token acquisition, caching, and renewal-on-401 are handled entirely by
Duende.AccessTokenManagement — not a custom re-implementation.
For the other two Aetherweave auth cases, see their own packages:
| Case | Package |
|---|---|
| Protecting your own API by validating incoming JWTs | Zwedze.Aetherweave.Security.Jwt |
| Interactive user login for a Blazor WebAssembly UI | Zwedze.Aetherweave.Security.Oidc |
A service can be a client of many different APIs, each behind a different identity provider — register one named scheme per downstream API.
Installation
dotnet add package Zwedze.Aetherweave.Security.ClientCredentials
Configuration (Aetherweave:Security:ClientCredentials)
| Key | Notes |
|---|---|
TokenEndpoint |
Required. Absolute URI of the IDP's token endpoint |
ClientId |
Required. |
ClientSecret |
Required. Never commit real values — use environment-specific configuration or a secret store |
Scope |
Optional |
{
"Aetherweave": {
"Security": {
"ClientCredentials": {
"orders-api": {
"TokenEndpoint": "https://identity.example.com/connect/token",
"ClientId": "orders-service",
"ClientSecret": "secret",
"Scope": "orders.api"
},
"payments-api": {
"TokenEndpoint": "https://payments-identity.example.com/connect/token",
"ClientId": "orders-service",
"ClientSecret": "another-secret"
}
}
}
}
}
Quick Start
1. Register named schemes once
services.AddAetherweaveClientCredentialsAuthentication(configuration);
// Or with a custom section name
services.AddAetherweaveClientCredentialsAuthentication(configuration, "MyApp:ClientCredentials");
Configure zero, one, or many named schemes — nothing is registered globally until an HttpClient opts
into a scheme.
2. Opt in per HttpClient
services.AddAetherweaveHttpClient<IOrderServiceClient, OrderServiceClient>(configuration, "OrderService")
.WithClientCredentialsAuthentication("orders-api");
Works with gRPC clients too
WithClientCredentialsAuthentication is an IHttpClientBuilder extension, and Grpc.Net.ClientFactory's
AddGrpcClient<TClient> (wrapped by Zwedze.Aetherweave.Grpc) returns that same builder type — so it
composes onto gRPC clients with no extra code:
services.AddAetherweaveGrpcClient<Greeter.GreeterClient>(configuration, "GreeterService")
.WithClientCredentialsAuthentication("greeter-api");
Behavior notes
- Failures don't throw. If
Duende.AccessTokenManagementcan't acquire a token, it logs a warning and sends the request without a token rather than throwing — this is Duende's own documented behavior, not something this library changes. - Never commit
ClientSecretvalues — use environment-specific configuration or a secret store.
API Reference
| Member | Signature |
|---|---|
AddAetherweaveClientCredentialsAuthentication |
(this IServiceCollection, IConfiguration, string sectionName = "Aetherweave:Security:ClientCredentials") → IServiceCollection |
IHttpClientBuilder.WithClientCredentialsAuthentication |
(string schemeName) → IHttpClientBuilder — attaches the client-credentials token handler to an HttpClient |
| 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
- Duende.AccessTokenManagement (>= 4.2.0)
- Microsoft.Extensions.Http (>= 10.0.10)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.10)
- Microsoft.Extensions.Options.DataAnnotations (>= 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 | 102 | 9/3/2026 |
| 0.2.5-pre.2 | 66 | 9/3/2026 |
| 0.2.5-pre.1 | 68 | 8/13/2026 |
| 0.2.5-extend-db-registratio... | 56 | 8/31/2026 |
| 0.2.4 | 112 | 8/13/2026 |
| 0.2.4-pre.1 | 71 | 8/13/2026 |
| 0.2.3 | 101 | 8/6/2026 |
| 0.2.3-pre.1 | 69 | 8/6/2026 |
| 0.2.2 | 115 | 8/5/2026 |
| 0.2.2-pre.1 | 68 | 7/30/2026 |
| 0.2.1 | 105 | 7/29/2026 |
| 0.2.1-pre.1 | 71 | 7/29/2026 |