Rkd.Scalar.Abstractions 2.12.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package Rkd.Scalar.Abstractions --version 2.12.1
                    
NuGet\Install-Package Rkd.Scalar.Abstractions -Version 2.12.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="Rkd.Scalar.Abstractions" Version="2.12.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Rkd.Scalar.Abstractions" Version="2.12.1" />
                    
Directory.Packages.props
<PackageReference Include="Rkd.Scalar.Abstractions" />
                    
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 Rkd.Scalar.Abstractions --version 2.12.1
                    
#r "nuget: Rkd.Scalar.Abstractions, 2.12.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 Rkd.Scalar.Abstractions@2.12.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=Rkd.Scalar.Abstractions&version=2.12.1
                    
Install as a Cake Addin
#tool nuget:?package=Rkd.Scalar.Abstractions&version=2.12.1
                    
Install as a Cake Tool

Rkd.Scalar.Abstractions

The contracts of Rkd.Scalar for the layers that implement them — Infrastructure, Application — without ASP.NET Core, Scalar, OpenAPI or API versioning. Install the whole Rkd.Scalar only in the API project, which registers what the other layers implement.

dotnet add src/MyApp.Infrastructure package Rkd.Scalar.Abstractions
dotnet add src/MyApp.Api package Rkd.Scalar
// MyApp.Infrastructure — references Rkd.Scalar.Abstractions only
using Rkd.Scalar;   // every type of this package (the package name is not a namespace)

public sealed class LoginValidator(AppDbContext db, IPasswordHasher hasher) : ICredentialValidator<LoginRequest>
{
    public async Task<CredentialValidationResult> ValidateAsync(LoginRequest request, CancellationToken cancellationToken = default)
    {
        var user = await db.Users.SingleOrDefaultAsync(u => u.Username == request.Username, cancellationToken);

        if (user is null || !hasher.Verify(request.Password, user.PasswordHash))
            return CredentialValidationResult.Failure("Invalid username or password.");

        return CredentialValidationResult.Success(
            new Claim(ClaimTypes.NameIdentifier, user.Id.ToString()),
            new Claim(ClaimTypes.Name, user.Username));
    }
}

// MyApp.Api — references Rkd.Scalar
builder.AddRkdScalar()
    .WithBearerAuth<LoginRequest, LoginValidator>();
Area Types
Credentials ICredentialValidator<TCredentials>, CredentialValidationResult, BasicAuthCredentials, ApiKeyCredentials, RkdScalarAuthenticationSchemes
JWT IJwtTokenService, JwtToken, JwtLoginResponse, IJwtSigner (KMS, Key Vault, HSM), IJwtSigningKeyResolver, JwtSigningKey, JwtSigningKeyContext, RkdPem
HTTP logging IHttpLogSink, HttpLogEntry
  • Same types and namespace (Rkd.Scalar) used by Rkd.Scalar: nothing to map between layers. Rkd.Scalar depends on this package, so the API project gets it automatically.
  • Only dependency: Microsoft.IdentityModel.Tokens (the SecurityKey of JwtSigningKey).
  • Errors thrown from any layer (RkdError, ProblemException) are in Rkd.Scalar.Errors.

See the Rkd.Scalar documentation.

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 (1)

Showing the top 1 NuGet packages that depend on Rkd.Scalar.Abstractions:

Package Downloads
Rkd.Scalar

Zero-boilerplate Scalar wrapper for ASP.NET Core. Configures OpenAPI, API Versioning and Authentication (JWT with HMAC, RSA, ECDSA, OIDC/JWKS or async/KMS signing, Basic, API Key) in a few fluent lines, applies XML documentation comments automatically, standardizes errors as RFC 9457 problem details, with built-in documentation UI protection, a development login endpoint and configuration-based validators.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.13.0 0 11/28/2026
2.12.1 58 11/27/2026
2.12.0 161 11/10/2026
2.11.0 150 11/7/2026
2.10.0 173 10/28/2026