Totallytech.BranchAuth.Diagnostics 1.1.0
Totallytech.BranchAuth
Helpers for calling and receiving branch-scoped internal APIs through the token broker. Built for .NET 8 and .NET 10.
Totallytech.BranchAuth.Client:
IBranchTokenClient.GetAsync(companyId, branchId, scope)gets a short-lived access token from the broker. The service proves its identity with its own identity server client (BranchTokenClient:CallerAuth = ClientCredentials, secret from its secret store) or, on Kubernetes, with the pod's projected service account token (ServiceAccountToken). Tokens are cached in memory until about 60 seconds before they expire.BranchNotEntitledException: the branch does not have the service or scope. This is a normal case and is not retried.- Broker 503, 429 and network errors are retried with backoff.
Totallytech.BranchAuth.AspNetCore for receiving services:
- Already validating tokens from the identity server:
builder.Services.AddBranchTenantAuthorization()(adds only the scope policies andITenantContext). - No token validation yet:
builder.AddBranchApiAuth("rcm")(JWT bearer validation againstBranchApiAuth:Authoritywith the given audience, plus the above). - A policy for every scope name:
[Authorize(Policy = "rcm.claims.write")]or.RequireAuthorization("rcm.claims.write"). ITenantContextreads thecompanyIdandbranchIdclaims from the validated token only.
- Already validating tokens from the identity server:
Totallytech.BranchAuth.EntityFrameworkCore:
modelBuilder.ApplyBranchTenantFilters(this)adds a global query filter onCompanyIdandBranchIdto everyITenantScopedentity.Totallytech.BranchAuth.Diagnostics: step-by-step HTTP tracing, no ASP.NET Core dependency (console apps and workers too).
services.AddHttpTracing(configuration)logs every outgoing call of everyHttpClient; in a web serviceapp.UseHttpTracing()(Totallytech.BranchAuth.AspNetCore) logs every incoming request; with headers and bodies; secrets become[redacted]and tokens a fingerprint plus their claims. Off unlessHttpTrace:Enabledis true.
See the token-broker repository README for configuration.
Showing the top 20 packages that depend on Totallytech.BranchAuth.Diagnostics.
| Packages | Downloads |
|---|---|
|
Totallytech.BranchAuth.AspNetCore
JWT bearer validation, scope policies and a token-based tenant context for services that receive branch-scoped calls.
|
6 |
.NET 10.0
- Microsoft.Extensions.Http (>= 10.0.15)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 10.0.15)
.NET 8.0
- Microsoft.Extensions.Http (>= 8.0.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 8.0.0)
| Version | Downloads | Last updated |
|---|---|---|
| 1.1.0 | 6 | 11/18/2026 |