Authlink.Policy.Client.ServiceStack
1.0.3
dotnet add package Authlink.Policy.Client.ServiceStack --version 1.0.3
NuGet\Install-Package Authlink.Policy.Client.ServiceStack -Version 1.0.3
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.3" />
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.3" />
<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.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Authlink.Policy.Client.ServiceStack, 1.0.3"
#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.3
#: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.3
#tool nuget:?package=Authlink.Policy.Client.ServiceStack&version=1.0.3
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
PolicyPluginthat 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";
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.3)
- 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.