Authlink.Webhooks
1.0.0
dotnet add package Authlink.Webhooks --version 1.0.0
NuGet\Install-Package Authlink.Webhooks -Version 1.0.0
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="Authlink.Webhooks" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Authlink.Webhooks" Version="1.0.0" />
<PackageReference Include="Authlink.Webhooks" />
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 Authlink.Webhooks --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Authlink.Webhooks, 1.0.0"
#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 Authlink.Webhooks@1.0.0
#: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=Authlink.Webhooks&version=1.0.0
#tool nuget:?package=Authlink.Webhooks&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Authlink.Webhooks
Webhook signature validation and event parsing for Authlink webhook integration.
Installation
dotnet add package Authlink.Webhooks
Quick Start
Register services in your application:
using Authlink.Webhooks.Extensions;
// In Program.cs or Startup.cs
services.AddAuthlinkWebhooks();
Usage
Parsing and Validating Webhook Events
using Authlink.Webhooks.Core.Abstractions;
using Authlink.Webhooks.Core.Payloads;
public class WebhookController : ControllerBase
{
private readonly IWebhookEventParser _parser;
public WebhookController(IWebhookEventParser parser)
{
_parser = parser;
}
[HttpPost]
public async Task<IActionResult> HandleWebhook()
{
using var reader = new StreamReader(Request.Body);
var payload = await reader.ReadToEndAsync();
var signature = Request.Headers["X-Webhook-Signature"].ToString();
var timestamp = Request.Headers["X-Webhook-Timestamp"].ToString();
var secret = Configuration["Webhook:Secret"];
var result = _parser.ParseAndValidate<RegistrationCompletingPayload>(
payload, signature, timestamp, secret);
if (!result.IsSuccess)
{
return Unauthorized(result.Error);
}
var webhookEvent = result.Event!;
// Process the event...
return Ok(WebhookResponseBuilder.Approve());
}
}
Basic Signature Validation
using Authlink.Webhooks.Core.Abstractions;
public class WebhookHandler
{
private readonly IWebhookSignatureValidator _validator;
public WebhookHandler(IWebhookSignatureValidator validator)
{
_validator = validator;
}
public bool ValidateRequest(string payload, string signature, string timestamp, string secret)
{
return _validator.ValidateSignature(payload, signature, timestamp, secret);
}
}
Parsing Without Validation
using Authlink.Webhooks.Core.Abstractions;
using Authlink.Webhooks.Core.Payloads;
// Parse without signature validation (use with caution)
var result = _parser.Parse<RegistrationCompletingPayload>(jsonPayload);
if (result.IsSuccess)
{
var webhookEvent = result.Event!;
Console.WriteLine($"Event Type: {webhookEvent.EventType}");
Console.WriteLine($"Event ID: {webhookEvent.EventId}");
}
Security
- Uses HMAC-SHA256 for signature computation
- Constant-time comparison to prevent timing attacks
- Signature format:
sha256={hex_hash} - Supports timestamp validation for replay attack prevention
Related Packages
- Authlink.Webhooks.Core - Core types, interfaces, and response models
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. 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.
-
net9.0
- Authlink.Webhooks.Core (>= 1.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 9.0.0)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Authlink.Webhooks:
| Package | Downloads |
|---|---|
|
Authlink.Webhooks.AspNetCore
ASP.NET Core integration for Authlink webhook handling |
|
|
Authlink.Webhooks.ServiceStack
ServiceStack integration for Authlink webhook handling with automatic signature validation. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 34 | 3/6/2026 |