JJConsulting.Infinity.Client.Webhooks
1.4.25
dotnet add package JJConsulting.Infinity.Client.Webhooks --version 1.4.25
NuGet\Install-Package JJConsulting.Infinity.Client.Webhooks -Version 1.4.25
<PackageReference Include="JJConsulting.Infinity.Client.Webhooks" Version="1.4.25" />
<PackageVersion Include="JJConsulting.Infinity.Client.Webhooks" Version="1.4.25" />
<PackageReference Include="JJConsulting.Infinity.Client.Webhooks" />
paket add JJConsulting.Infinity.Client.Webhooks --version 1.4.25
#r "nuget: JJConsulting.Infinity.Client.Webhooks, 1.4.25"
#:package JJConsulting.Infinity.Client.Webhooks@1.4.25
#addin nuget:?package=JJConsulting.Infinity.Client.Webhooks&version=1.4.25
#tool nuget:?package=JJConsulting.Infinity.Client.Webhooks&version=1.4.25
JJConsulting.Infinity.Client.Webhooks
Client library for handling JJInfinity Webhooks in ASP.NET Core applications, providing typed access to audit log events with signature validation and a pluggable processing model.
Installation
Install via NuGet:
dotnet add package JJConsulting.Infinity.Client.Webhooks
Usage
1. Implement a webhook processor
Create a class inheriting from InfinityWebhookProcessor and override the handlers you care about.
using JJConsulting.Infinity.Client.Webhooks;
public sealed class MyInfinityWebhookProcessor : InfinityWebhookProcessor
{
protected override ValueTask ProcessUserAlreadyExistsAsync(Guid userId)
{
// Your logic here
return ValueTask.CompletedTask;
}
}
You may override ProcessEventAsync if you want to handle additional event types beyond the built-in routing.
2. Register the processor
Register your processor in the DI container.
builder.Services.AddInfinityWebhookProcessor<MyInfinityWebhookProcessor>();
3. Map the webhook endpoint
Expose the webhook endpoint in your Program.cs or endpoint configuration.
app.MapInfinityWebhooks();
The endpoint:
- By default, is registered at
api/webhooks/infinity - Enforces
application/json - Validates the request signature (if a secret is provided)
- Deserializes the payload into
AuditLogEvent - Dispatches processing to your processor
4. Event routing
Events are routed based on the eventType value found in AuditLogEvent.Properties.
Example payload fragment:
{
"properties": {
"eventType": "UserAlreadyExists"
}
}
If the event type is missing or unrecognized, the request is safely ignored.
5. Error handling
- Signature or content-type failures are logged and ignored
- Exceptions thrown during processing are logged and rethrown
- The library does not swallow application-level failures
Supported events
Currently, the following events are supported:
Users:
UserAlreadyExists
Localization:
StringAddedStringModifiedStringRemoved
Additional events can be supported by overriding ProcessEventAsync.
Notes
- The processor is registered as a singleton
- Request bodies are read once and reused for signature verification
- No response body is returned by default (webhook acknowledgment only)
| 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
- JJConsulting.Infinity.Client (>= 1.4.25)
- JJConsulting.Infinity.Domain (>= 1.4.25)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.