Henara.Grpc.Client.Imagelink 1.2.0
Henara.Grpc.Client.Imagelink
gRPC client library for the ImageLink pipeline gateway and reporting service. Usable from any .NET host.
Authentication is supplied by an ICallTokenProvider.
Environment variables
| Variable | Required by | Description |
|---|---|---|
URL_IMAGELINK_PIPELINE |
client construction | Absolute URL of the pipeline gateway |
URL_IMAGELINK_REPORTER |
client construction | Absolute URL of the reporting service |
SERVER_ACCESS_TOKEN |
AddImageLinkDomainExternalGrpcClients |
Static API token (in-stack token provider) |
DI setup — web / inside our stack (static API key)
The ImageLink frontend is admin/allowlist-gated and authenticates outbound calls with the static server token
via its GatedImageLinkTokenProvider:
services.AddScoped<ICallTokenProvider, GatedImageLinkTokenProvider>();
services.AddImageLinkDomainExternalGrpcClients(); // registers ServerOptions (SERVER_ACCESS_TOKEN)
DI setup — native client (Keycloak user token)
For a native consumer that authenticates a Keycloak user, register the shared refreshing provider from
Henara.Grpc.Client.Common instead of the static-token provider:
services.AddNativeKeycloakAuth(o =>
{
o.TokenEndpoint = "https://auth.praxx.me/realms/henara/protocol/openid-connect/token";
o.ClientId = "henara-main-sso";
});
services.AddImageLinkDomainExternalGrpcClients();
// after the webview login completes:
var auth = provider.GetRequiredService<KeycloakRefreshingTokenProvider>();
auth.Initialize(accessToken, refreshToken, expiresInSeconds);
Example calls
var reporter = provider.GetRequiredService<IImageLinkReporterClient>();
await foreach (var p in reporter.GetImageLinkStati(new ImageLinkFilter { EmpfaengerIk = new MatchesIntFilterDto(123456789) }))
Console.WriteLine($"{p.ProcessInfo.ReceiverIk} {p.ProcessInfo.SammelrechnungNumber}");
var (rows, total) = await reporter.GetFilesPaged(page: 0, pageSize: 100, search: "");
var gateway = provider.GetRequiredService<IImageLinkGatewayClient>();
await foreach (var r in gateway.DispatchImageLinkProcess(requests))
Console.WriteLine(r.IsDispatched ? r.PipelineId.ToString() : r.Message);
No packages depend on Henara.Grpc.Client.Imagelink.
.NET 10.0
- Grpc.AspNetCore (>= 2.80.0)
- Grpc.Net.Client (>= 2.80.0)
- Henara.Grpc.Client.Common (>= 1.2.0)
- ImageLink.Application.Pipeline (>= 1.2.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.8)