Authlink.Webhooks.ServiceStack 1.0.0

dotnet add package Authlink.Webhooks.ServiceStack --version 1.0.0
                    
NuGet\Install-Package Authlink.Webhooks.ServiceStack -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.ServiceStack" 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.ServiceStack" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Authlink.Webhooks.ServiceStack" />
                    
Project file
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.ServiceStack --version 1.0.0
                    
#r "nuget: Authlink.Webhooks.ServiceStack, 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.ServiceStack@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.ServiceStack&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Authlink.Webhooks.ServiceStack&version=1.0.0
                    
Install as a Cake Tool

Authlink.Webhooks.ServiceStack

ServiceStack integration for Authlink webhook handling with automatic signature validation.

Installation

dotnet add package Authlink.Webhooks.ServiceStack

Quick Start

Register the plugin in your AppHost using the extension method:

using Authlink.Webhooks.ServiceStack.Extensions;

public class AppHost : AppHostBase
{
    public override void Configure()
    {
        this.AddAuthlinkWebhooks(options =>
        {
            options.SecretConfigKey = "Webhooks:Secret";
        });
    }
}

Usage

Using the Request Filter Attribute

The [ValidateWebhookSignature] attribute validates signatures before your service executes:

using Authlink.Webhooks.ServiceStack.Filters;
using Authlink.Webhooks.Core.Payloads;
using Authlink.Webhooks.Core.Responses;

[ValidateWebhookSignature]
public class WebhookService : Service
{
    public object Post(WebhookEvent<RegistrationCompletingPayload> request)
    {
        // Signature has already been validated
        // Process the webhook...

        return WebhookResponseBuilder.Approve();
    }
}

Customizing Configuration Key

[ValidateWebhookSignature(SecretConfigKey = "Webhooks:RegistrationSecret")]
public class WebhookService : Service
{
    public object Post(WebhookEvent<RegistrationCompletingPayload> request)
    {
        return WebhookResponseBuilder.Approve();
    }
}

Customizing Header Names

[ValidateWebhookSignature(
    SecretConfigKey = "Webhooks:Secret",
    SignatureHeader = "X-Custom-Signature",
    TimestampHeader = "X-Custom-Timestamp")]
public object Post(WebhookEvent<RegistrationCompletingPayload> request)
{
    return WebhookResponseBuilder.Approve();
}

Configuring the Plugin Directly

using Authlink.Webhooks.ServiceStack.Plugins;
using Authlink.Webhooks.ServiceStack.Options;

Plugins.Add(new AuthlinkWebhooksFeature
{
    Options = new WebhookOptions
    {
        Secret = "your-webhook-secret",
        // Or use configuration key
        SecretConfigKey = "Webhooks:RegistrationSecret",
        SignatureHeader = "X-Authlink-Signature",
        TimestampHeader = "X-Authlink-Timestamp"
    }
});

Configuration

Add your webhook secret to your app settings:

{
  "Webhooks": {
    "Secret": "your-webhook-secret-here"
  }
}

Or configure via AppSettings:

SetConfig(new HostConfig {
    AppSettings = new DictionarySettings(new Dictionary<string, string> {
        { "Webhooks:Secret", "your-webhook-secret" }
    })
});

Error Responses

When signature validation fails, the filter returns:

  • 401 Unauthorized with { "error": "Missing webhook signature" } if the signature header is missing
  • 401 Unauthorized with { "error": "Invalid webhook signature" } if the signature is invalid

Security Features

  • HMAC-SHA256 signature validation
  • Support for timestamp-based replay attack prevention
  • Constant-time signature comparison
Product 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.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 34 3/6/2026