Authlink.Policy.Client.ServiceStack
1.0.1
dotnet add package Authlink.Policy.Client.ServiceStack --version 1.0.1
NuGet\Install-Package Authlink.Policy.Client.ServiceStack -Version 1.0.1
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.Policy.Client.ServiceStack" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Authlink.Policy.Client.ServiceStack" Version="1.0.1" />
<PackageReference Include="Authlink.Policy.Client.ServiceStack" />
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.Policy.Client.ServiceStack --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Authlink.Policy.Client.ServiceStack, 1.0.1"
#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.Policy.Client.ServiceStack@1.0.1
#: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.Policy.Client.ServiceStack&version=1.0.1
#tool nuget:?package=Authlink.Policy.Client.ServiceStack&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
📦 Package Overview
Authlink.Policy.Client.ServiceStack
integrates Authlink’s Policy Decision Point (PDP) into ServiceStack services. It builds on Authlink.Policy.Client.Core and Authlink.Policy.Client.Http to provide:
- A
[RequiresPermission]
attribute for Request DTOs - A
PolicyPlugin
that registers the HTTP client and (optionally) a global filter - Fail-closed enforcement (403 on Deny or errors)
🚀 Install
dotnet add package Authlink.Policy.Client.ServiceStack
Or via Package Manager:
PM> Install-Package Authlink.Policy.Client.ServiceStack
🔧 Purpose
This package makes it trivial to protect ServiceStack endpoints by:
- Annotating Request DTOs with required permission keys and optional resource keys
- Automatically calling the Authlink PDP over HTTP
- Returning HTTP 403 for denied requests, without boilerplate
⚙️ Usage
1. Register the plugin in your AppHost.Configure
public override void Configure(Container container)
{
// your auth providers...
Plugins.Add(new PolicyPlugin(options =>
{
options.BaseUrl = "https://authlink.co.za/api/v1";
opt.ClientId = new Guid("11111111-2222-3333-4444-555555555555");
}));
}
2. Decorate your Request DTOs
[RequiresPermission("invoice:create", "INVOICE")]
public class CreateInvoice : IReturn<InvoiceResponse>
{
public string Description { get; set; }
}
Any request without the required permission (or on HTTP errors) returns 403 Forbidden.
📚 Documentation
Coming soon at: https://docs.authlink.co.za
📄 License
MIT
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.Policy.Client.Http (>= 1.0.1)
- ServiceStack (>= 8.7.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.