Henara.Grpc.Client.Common 2.1.0

Henara.Grpc.Client.Common

Shared base for the Henara gRPC client libraries (Henara.Grpc.Client.Dakota, Henara.Grpc.Client.Imagelink, Henara.Grpc.Client.DakotaSlim). The domain clients bring it in transitively — you normally don't reference it directly.

It provides:

  • GrpcClientBase — builds an authenticated, retrying GrpcChannel whose per-call authorization header comes from an ICallTokenProvider. Allows call credentials over plaintext (http/h2c) targets and disposes the channels it creates.
  • KeycloakRefreshingTokenProvider — an ICallTokenProvider for native clients. Seed it with the tokens from an Authorization Code + PKCE login via Initialize(...); it refreshes the access token before expiry (rotating the refresh token) and throws when refresh fails (re-login required).
  • AddNativeKeycloakAuth(...) — registers the provider above as the singleton ICallTokenProvider. Throws if an ICallTokenProvider is already registered — there must be exactly one token authority.

Native auth wire-up

services.AddNativeKeycloakAuth(o =>
{
    o.TokenEndpoint = "https://auth.praxx.me/realms/henara/protocol/openid-connect/token";
    o.ClientId      = "henara-main-sso";
});
services.AddDakotaExternalGrpcClients(); // or AddImageLinkDomainExternalGrpcClients()

// after the login completes, seed the tokens from the login response:
var auth = provider.GetRequiredService<KeycloakRefreshingTokenProvider>();
auth.Initialize(accessToken, refreshToken, expiresInSeconds);

For a host that already owns a Keycloak session (e.g. SmartVO), do not use this provider — use Henara.Grpc.Client.DakotaSlim, which adapts the host's existing token.

Supplying your own token provider

Any ICallTokenProvider works — register it before the domain clients to authenticate calls with a token you already have (a web app's user token, a static server token, …):

services.AddScoped<ICallTokenProvider, MyTokenProvider>();
services.AddDakotaExternalGrpcClients();

Showing the top 20 packages that depend on Henara.Grpc.Client.Common.

Packages Downloads
Henara.Grpc.Client.Dakota
Henara Dakota external gRPC client (pipeline + reporting) with native Keycloak token refresh
125
Henara.Grpc.Client.Dakota
Henara Dakota external gRPC client (pipeline + reporting) with native Keycloak token refresh
6
Henara.Grpc.Client.Dakota
Henara Dakota external gRPC client (pipeline + reporting) with native Keycloak token refresh
4
Henara.Grpc.Client.Imagelink
Henara ImageLink external gRPC client (pipeline + reporting)
4
Henara.Grpc.Client.Dakota
Henara Dakota external gRPC client (pipeline + reporting) with native Keycloak token refresh
3
Henara.Grpc.Client.Imagelink
Henara ImageLink external gRPC client (pipeline + reporting)
3
Henara.Grpc.Client.Dakota
Henara Dakota external gRPC client (pipeline + reporting) with native Keycloak token refresh
2
Henara.Grpc.Client.Imagelink
Henara ImageLink external gRPC client (pipeline + reporting)
2
Henara.Grpc.Client.Dakota
Henara Dakota external gRPC client (pipeline + reporting) with native Keycloak token refresh
1
Henara.Grpc.Client.Imagelink
Henara ImageLink external gRPC client (pipeline + reporting)
0

Version Downloads Last updated
2.2.0 128 07/13/2026
2.1.0 9 07/09/2026
2.0.0 4 07/05/2026
1.3.0 7 06/25/2026
1.2.0 2 06/25/2026
1.1.0 2 06/25/2026
1.0.0 3 06/25/2026