Unclaimable.AspNetCore 0.8.5

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

Unclaimable.AspNetCore

ASP.NET Core dependency-injection and DataAnnotations integration for Unclaimable.

Package version: 0.8.5 LTS

Install

Install the v0.8.5 LTS package once it is available on NuGet.org.

dotnet add package Unclaimable.AspNetCore --version 0.8.5

The required Unclaimable core dependency is installed transitively.

0.8.5 LTS

The ASP.NET Core adapter preserves the established dependency-injection and DataAnnotations integration. It uses the updated Core 0.8.5 engine, expanded reserved-word coverage, matching improvements and optional false-positive guard; no adapter-specific public API changes are intended.

builder.Services.AddUnclaimable(options =>
{
    options.FalsePositiveSensitivity = FalsePositiveSensitivity.Medium;
});

Low remains the default. Updated reserved names may change which user inputs are rejected; these are content/validation changes rather than a change to DI registration semantics.

Framework support

Unclaimable.AspNetCore 0.8.4 ships framework-specific assets for net6.0, net7.0, net8.0, net9.0, net10.0, and net11.0. NuGet selects the matching asset for the consuming application automatically.

The compatibility suite compiles and runs the DI and DataAnnotations integration on every advertised target. net11.0 support is tested against the current .NET 11 prerelease SDK until .NET 11 reaches general availability.

0.8.4 behavior

This package continues to register the same Core checker and policy through DI and DataAnnotations. The Core 0.8.4 embedded-profanity and scoped-exception corrections apply automatically; the public ASP.NET Core integration API is unchanged. Existing required-field validation remains separate from [ClaimableUsername].

0.8.3 Core behavior

ASP.NET Core uses the Core Options object, so the 0.8.3 correctness, lower-collision identity defaults, Unicode fixes, and matching performance improvements apply automatically.

Collision-heavy identity vocabulary is claimable by default while the identity rules remain enabled. Applications that intentionally want the broader identity vocabulary can opt back in during registration:

builder.Services.AddUnclaimable(options =>
{
    options.IncludeHighCollisionIdentityTerms = true;
});

Obfuscation sensitivity

Sensitivity is configured in the normal registration callback:

builder.Services.AddUnclaimable(options =>
{
    options.ObfuscationSensitivity =
        ObfuscationSensitivity.High;
});

Medium is the default. Use Low for behavior closest to 0.8.1, or opt into High / Extreme when the application intentionally prefers more aggressive evasion blocking.

Register services

using Microsoft.Extensions.DependencyInjection;

builder.Services.AddUnclaimable();

This registers the configured Options, a live singleton IPolicy, and an IChecker.

With no configuration callback, the registered checker uses the same 0.8.3 defaults as a normal new Checker(): all built-in protected identity rules are enabled except Rule.Numbers, the standard pattern defaults apply, and the same deny-first behavior is preserved.

Configure the checker during registration:

builder.Services.AddUnclaimable(options =>
{
    options.AdditionalReserved.Add("examplebrand");
    options.AdditionalBlockedCharacters("^");
    options.DisableCategory(Category.Brands);
});

Inject the checker

public sealed class AccountService
{
    private readonly IChecker _checker;

    public AccountService(IChecker checker)
    {
        _checker = checker;
    }

    public bool CanClaim(string userName) => _checker.IsClaimable(userName);
}

DataAnnotations

Use [ClaimableUsername] on a string property, field, or parameter:

using System.ComponentModel.DataAnnotations;
using Unclaimable.AspNetCore;

public sealed class SignupModel
{
    [Required]
    [ClaimableUsername]
    public string UserName { get; set; } = string.Empty;
}

ClaimableUsernameAttribute accepts null, allowing [Required] or another required-field mechanism to remain independent.

When dependency injection is available, the attribute uses the registered IChecker. Otherwise it falls back to Checker.Default.

Validation messages

A custom attribute message can be supplied normally:

[ClaimableUsername(ErrorMessage = "Choose another username.")]
public string UserName { get; set; } = string.Empty;

Application-wide and reason-specific validation messages can also be configured through the registered Options.

Startup allowances and scoped exceptions

Keep the 0.8.3 defaults enabled and express application conventions narrowly:

builder.Services.AddUnclaimable(options =>
{
    // Team names may use underscores.
    options.AllowCharacters("_");

    // Team prefixes may repeat T directly.
    options.AllowRepeatedCharacters("T");

    // This complete identifier may skip only the city-name rule.
    options.AllowIdentifierForRule(
        "Charlotte",
        Rule.PopularCityNames);

    // This complete identifier may skip only repetition detection.
    options.AllowIdentifierForPattern(
        "ababab",
        Pattern.Repeated);

    // Application-owned names remain explicit denies.
    options.Reserve(
        "internalbot",
        ReservedMatchMode.Exact);
});

A scoped exception skips only the selected check. It does not make the identifier globally allowed.

For a convention such as TTT_user7, AllowCharacters("_") and AllowRepeatedCharacters("T") preserve the rest of the checker. AAA_user7 can still fail repetition, TTT-user7 can still fail the blocked-character policy, and an application reservation can still deny TTT_user7 explicitly.

Runtime character policy

The registered IPolicy remains live after startup:

var policy = app.Services.GetRequiredService<IPolicy>();

policy.BlockCharacter("@");
policy.AllowCharacter("@");

Startup Options are captured when the checker is constructed; runtime character-policy changes remain visible to that checker.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  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 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.  net11.0 is compatible. 
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 130 10/28/2026
0.8.5 936 10/14/2026
0.8.4 177 10/12/2026
0.8.3 105 10/9/2026
0.8.2 121 10/2/2026
0.8.1 105 10/2/2026
0.8.0 5,814 9/21/2026
0.7.8 1,167 9/18/2026
0.7.7 163 9/18/2026
0.7.6 183 9/18/2026
0.7.4 131 9/17/2026
0.7.0 689 9/15/2026
0.6.0 221 9/15/2026
0.5.0 302 9/9/2026
0.4.0 122 9/9/2026
0.3.0 128 9/8/2026
0.2.0 124 9/8/2026
0.1.0 170 9/8/2026