Linbik.Server 1.2.0-preview.3

This is a prerelease version of Linbik.Server.
dotnet add package Linbik.Server --version 1.2.0-preview.3
                    
NuGet\Install-Package Linbik.Server -Version 1.2.0-preview.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="Linbik.Server" Version="1.2.0-preview.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Linbik.Server" Version="1.2.0-preview.3" />
                    
Directory.Packages.props
<PackageReference Include="Linbik.Server" />
                    
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 Linbik.Server --version 1.2.0-preview.3
                    
#r "nuget: Linbik.Server, 1.2.0-preview.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 Linbik.Server@1.2.0-preview.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=Linbik.Server&version=1.2.0-preview.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Linbik.Server&version=1.2.0-preview.3&prerelease
                    
Install as a Cake Tool

Linbik.Server

Integration service package for Linbik Framework. Provides JWT validation middleware, dual authentication schemes (user + S2S), integration lifecycle handlers, telemetry, and health checks.

📦 Installation

dotnet add package Linbik.Server

🚀 Features

  • Dual JWT Authentication SchemesLinbikUserService (user context) + LinbikS2S (machine context)
  • [LinbikDelegatedAuthorize] — RS256 JWT attribute for user-context endpoints
  • [LinbikApplicationAuthorize] — RS256 JWT attribute for S2S endpoints with role-based access
  • Cross-Scheme Injection Protection — Prevents token misuse between schemes
  • ILinbikIntegrationHandler — Integration lifecycle events (created, removed, toggled, admin changed)
  • OpenTelemetry — Built-in telemetry with AddLinbikTelemetry()
  • Health Checks — Service health monitoring with AddLinbikHealthChecks()

🔧 Configuration

// In Program.cs
builder.Services.AddLinbik()
    .AddLinbikServer();

var app = builder.Build();
app.EnsureLinbik();

app.UseAuthentication();
app.UseAuthorization();

Standalone Setup

builder.Services.AddLinbikServer(options =>
{
    options.ServiceId = "your-service-guid";
    options.PublicKey = builder.Configuration["Linbik:PublicKey"];
    options.PackageName = "payment-gateway";
});

💻 Usage

Protecting Endpoints

[ApiController]
[Route("api/integration")]
public class IntegrationController : ControllerBase
{
    // User-context endpoint (requires user JWT)
    [LinbikDelegatedAuthorize]
    [HttpPost("charge")]
    public IActionResult Charge([FromBody] ChargeRequest request)
    {
        var claims = HttpContext.GetLinbikClaims();
        var userId = HttpContext.GetLinbikUserId();
        return Ok();
    }

    // S2S endpoint — any S2S token accepted
    [LinbikApplicationAuthorize]
    [HttpPost("s2s/sync")]
    public IActionResult SyncData() => Ok();

    // S2S endpoint — only service-to-service tokens (role=Service)
    [LinbikApplicationAuthorize("Service")]
    [HttpPost("s2s/webhook/{eventType}")]
    public IActionResult S2SWebhook(string eventType) => Ok();

    // S2S endpoint — only platform tokens (role=Linbik)
    [LinbikApplicationAuthorize("Linbik")]
    [HttpPost("s2s/platform-event")]
    public IActionResult OnPlatformEvent() => Ok();
}

HttpContext Extensions

var claims = HttpContext.GetLinbikClaims();
var userId = HttpContext.GetLinbikUserId();
var userName = HttpContext.GetLinbikUserName();
var nickName = HttpContext.GetLinbikNickName();
var isAuthenticated = HttpContext.HasLinbikUser();

🔌 Integration Lifecycle Handler

Handle events when main services create/remove/toggle integrations with your service:

public class MyIntegrationHandler : ILinbikIntegrationHandler
{
    public Task<IntegrationEventResult> OnIntegrationCreatedAsync(IntegrationEvent e)
    {
        // A new service wants to use our integration
        return Task.FromResult(IntegrationEventResult.Success());
    }

    public Task<IntegrationEventResult> OnIntegrationRemovedAsync(IntegrationEvent e)
        => Task.FromResult(IntegrationEventResult.Success());

    public Task<IntegrationEventResult> OnIntegrationToggledAsync(IntegrationEvent e)
        => Task.FromResult(IntegrationEventResult.Success());

    public Task<IntegrationEventResult> OnIntegrationAdminChangedAsync(IntegrationEvent e)
        => Task.FromResult(IntegrationEventResult.Success());
}

Register:

// With custom handler
builder.Services.AddLinbikIntegrationHandler<MyIntegrationHandler>();

// Or default (no-op) handler
builder.Services.AddLinbikIntegrationHandler();

// Map integration endpoints
app.MapLinbikIntegrationEndpoints();

📊 Telemetry (OpenTelemetry)

// Add OpenTelemetry tracing and metrics
builder.Services.AddLinbikTelemetry(options =>
{
    options.ServiceName = "payment-gateway";
    options.EnableConsoleExporter = true;
});

🏥 Health Checks

builder.Services.AddLinbikHealthChecks();

app.UseLinbikHealthChecks();

📖 Documentation

📄 License

MIT License

Contact: info@linbik.com


Version: 1.2.0
Platform: ASP.NET Core 10.0 (net10.0)
Last Updated: 2 Nisan 2026

Product 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. 
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.2.0-preview.3 51 5/30/2026
1.2.0-preview.2 68 4/26/2026
1.2.0-preview.1 88 4/2/2026
1.1.0 399 12/5/2025
1.1.0-beta0007 101 3/6/2026
1.0.7 148 3/6/2026
1.0.1 232 12/14/2025
1.0.0 98 3/6/2026
0.60.1 105 3/6/2026
0.46.0 367 11/30/2025
0.45.12 362 11/30/2025
0.45.7 238 8/31/2025
0.45.6 220 8/31/2025
0.45.5 241 8/27/2025
0.44.0 253 8/24/2025
0.42.0 121 8/23/2025
0.41.0 133 8/15/2025
0.40.0 199 8/14/2025
0.39.0 199 8/14/2025
0.38.0 200 8/14/2025
Loading failed