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
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Zwedze.Aetherweave.Security.ClientCredentials" Version="0.2.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Zwedze.Aetherweave.Security.ClientCredentials" Version="0.2.5" />
                    
Directory.Packages.props
<PackageReference Include="Zwedze.Aetherweave.Security.ClientCredentials" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Zwedze.Aetherweave.Security.ClientCredentials --version 0.2.5
                    
#r "nuget: Zwedze.Aetherweave.Security.ClientCredentials, 0.2.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Zwedze.Aetherweave.Security.ClientCredentials@0.2.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Zwedze.Aetherweave.Security.ClientCredentials&version=0.2.5
                    
Install as a Cake Addin
#tool nuget:?package=Zwedze.Aetherweave.Security.ClientCredentials&version=0.2.5
                    
Install as a Cake Tool

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.AccessTokenManagement can'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 ClientSecret values — 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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