Chd.Security 8.6.2

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

Chd.Security 🔐

NuGet Downloads License: MIT

Chd.Security is a production-ready authentication and authorization library for .NET 8 and .NET Standard 2.0 (.NET Framework 4.7.2). It provides JWT token management, cookie-based authentication, IP filtering middleware, and secure user login workflows — all with minimal configuration. Part of the CHD (Cleverly Handle Difficulty) ecosystem.

What Does It Do?

Chd.Security provides enterprise-grade security features:

  • JWT Authentication: Symmetric & asymmetric token validation with configurable expiration
  • Cookie Authentication: Session-based auth for Razor Pages and MVC apps
  • JWT + Cookie Sharing: Token handoff between legacy (.NET 4.7.2) and modern (.NET 8) apps on the same domain
  • IP Whitelisting: Middleware to restrict access by IP address
  • Secure Login: Built-in SecurityContext for user authentication workflows
  • Token Services: Generate, validate, and refresh JWT tokens
  • Integration Ready: Works seamlessly with ASP.NET Core authentication pipeline

Who Is It For?

  • ASP.NET Core Developers building secure Web APIs, Razor Pages, or MVC apps
  • Teams needing quick JWT/Cookie auth setup without boilerplate
  • Microservices requiring centralized token validation
  • Projects with IP filtering requirements (VPN, internal tools, admin panels)
  • .NET Framework 4.7.2 projects migrating to .NET 8 on the same domain

📚 Table of Contents


Supported Targets

Target Available Features
net8.0 All methods
netstandard2.0 JwtAuthConfig, ITokenService, TokenServicev2, DTOs, Models

Methods that require ASP.NET Core (UseJwtTokenAuthorization, UseCookieAuthorization, etc.) are only available on net8.0.


Stop Writing Auth Boilerplate! ⚡

Every project needs authentication. Stop copy-pasting JWT configuration code. Chd.Security provides production-ready auth in 3 lines.

The Problem 😩

// ❌ Every project repeats this 100+ line JWT setup:
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
	.AddJwtBearer(options =>
	{
		options.TokenValidationParameters = new TokenValidationParameters
		{
			ValidateIssuerSigningKey = true,
			IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(key)),
			ValidateIssuer = true,
			ValidIssuer = issuer,
			ValidateAudience = true,
			ValidAudience = audience,
			ValidateLifetime = true,
			ClockSkew = TimeSpan.Zero
		};
	});
// ... plus session config, token service, cookie setup, IP filtering...

The Solution ✅

// ✅ One line for JWT auth
builder.Services.UseJwtTokenAuthorization(builder.Configuration);

// ✅ Or one line for Cookie auth
var app = builder.UseCookieAuthorization();

// ✅ Login in 2 lines
var token = await SecurityContext.Login(this, userModel);
if (!string.IsNullOrEmpty(token)) return RedirectToAction("Dashboard");

Why Chd.Security?

Problem Without Chd.Security With Chd.Security
JWT Setup 100+ lines of boilerplate per project 1 line: .UseJwtTokenAuthorization()
Cookie Auth Manual claims, session config, lifetime 1 line: .UseCookieAuthorization()
IP Whitelisting Custom middleware, header parsing Built-in middleware + config
Token Generation Manual JWT creation, signing, validation ITokenService with symmetric/asymmetric support
Secure Login Custom authentication logic SecurityContext.Login()
.NET 4.7.2 Bridge No easy path to token service JwtAuthConfig for legacy apps

Key Benefits:

  • 90% less code — No auth boilerplate
  • 🔒 Production-tested — Used in CHD ecosystem
  • 🧩 Clean APIs — Integrates seamlessly with ASP.NET Core
  • 🛡️ Secure by default — Industry-standard JWT practices
  • 🔧 Flexible — Supports symmetric, asymmetric, cookie auth, and .NET Framework
  • 📚 Well-documented — Real examples for every scenario

Installation

dotnet add package Chd.Security

NuGet Package Manager:

Install-Package Chd.Security

Package Reference (.csproj):

<PackageReference Include="Chd.Security" Version="8.6.0" />

Quick Start Guide

Step 1: JWT Authentication (Symmetric)

Step 1: Add Configuration

// appsettings.json
{
  "Jwt": {
	"Key": "YOUR_256_BIT_SECRET_KEY_MINIMUM_32_CHARACTERS_LONG!!",
	"Issuer": "https://your-auth-server.com",
	"Audience": "your-api-audience",
	"Mode": "Symmetric"
  }
}

Step 2: Configure Services

// Program.cs
var builder = WebApplication.CreateBuilder(args);

// ✅ One line JWT setup
builder.Services.UseJwtTokenAuthorization(builder.Configuration);

builder.Services.AddControllers();
var app = builder.Build();

app.UseAuthentication();
app.UseAuthorization();
app.MapControllers();
app.Run();

Step 3: Protect Your Endpoints

[ApiController]
[Route("api/[controller]")]
[Authorize] // ✅ Requires valid JWT token
public class ProductsController : ControllerBase
{
	[HttpGet]
	public IActionResult GetProducts()
	{
		return Ok(new { Message = "Secure data!" });
	}

	[HttpGet("public")]
	[AllowAnonymous]
	public IActionResult GetPublicData()
	{
		return Ok(new { Message = "No auth needed" });
	}
}

Step 2: JWT Authentication (Asymmetric - RSA)

When Your Architecture Needs Maximum Security (Microservices, Distributed Systems)

Why Asymmetric JWT?
Problem with Symmetric Asymmetric Solution
Same key signs & validates Private key signs, public key validates
Key must be shared with all services Only auth server has private key
One compromised service = system-wide breach Compromised API can't forge tokens
Not suitable for public APIs Public key can be shared safely
When to Use Asymmetric JWT (RSA)?
Scenario Recommendation Reason
Single monolithic app ❌ Symmetric Simpler, faster
Microservices (3+ APIs) ✅ Asymmetric Security isolation
Auth server + multiple services ✅ Asymmetric Private key stays on auth server
Third-party API integration ✅ Asymmetric Can share public key safely
High-security requirements ✅ Asymmetric No shared secrets
Quick Setup (Asymmetric)

Step 1: Generate RSA Key Pair

// Run once to generate keys
TokenServicev2.GenerateRsaKeys(
	privateKeyPath: "Keys/private_key.xml",
	publicKeyPath: "Keys/public_key.xml"
);
// ⚠️ Store private key securely (Azure Key Vault, AWS Secrets Manager)
// ✅ Public key can be shared with all services

Step 2: Configuration (Auth Server — Private Key)

{
  "Jwt": {
	"Mode": "Asymmetric",
	"PrivateKeyPath": "Keys/private_key.xml",
	"PublicKeyPath": "Keys/public_key.xml",
	"Issuer": "https://auth-server.com",
	"Audience": "all-services"
  }
}

Step 3: Configuration (API Services — Public Key Only)

{
  "Jwt": {
	"Mode": "Asymmetric",
	"PublicKeyPath": "Keys/public_key.xml",
	"Issuer": "https://auth-server.com",
	"Audience": "all-services"
  }
}

Step 4: Enable Asymmetric JWT

// Program.cs (both Auth Server and API Services)
var builder = WebApplication.CreateBuilder(args);

// ✅ Full setup including session and middleware
var app = builder.UseJwtTokenAuthorization();
app.MapControllers();
app.Run();
Security Benefits
Aspect Symmetric (HS256) Asymmetric (RS256)
Key Distribution All services need secret key Only public key distributed
Breach Impact One compromised service = all tokens can be forged Compromised service can't forge tokens
Key Rotation Update all services simultaneously Update only auth server
Third-Party Access Can't share key safely Can share public key with partners
Compliance Basic security Meets PCI-DSS, HIPAA, SOC2
Performance
Operation Symmetric (HS256) Asymmetric (RS256)
Token Generation ~0.1 ms ~2 ms
Token Validation ~0.1 ms ~0.5 ms

Recommendation: Use asymmetric JWT for microservices despite the slight overhead — security benefits outweigh the 2ms difference.


Perfect for Razor Pages apps with server-side rendering:

// Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();

// ✅ Cookie authentication with one line
var app = builder.UseCookieAuthorization();

app.MapRazorPages();
app.Run();

appsettings.json:

{
  "SecurityConfig": {
	"Issuer": "https://your-app.com",
	"Audience": "your-app-users",
	"Key": "YOUR_SECRET_KEY"
  }
}

Login Page Example:

// Pages/Login.cshtml.cs
public class LoginModel : PageModel
{
	[BindProperty]
	public string Username { get; set; }

	[BindProperty]
	public string Password { get; set; }

	public async Task<IActionResult> OnPostAsync()
	{
		var userModel = new UserModel
		{
			UserName = Username,
			Password = Password.ToMd5()
		};

		// ✅ Built-in secure login
		bool success = await SecurityContext.LoginCookieAuthentitation(
			this,
			userModel,
			ValidateUser
		);

		if (success)
			return RedirectToPage("/Dashboard");
		else
			return Page();
	}

	private UserDTO ValidateUser(UserModel model)
	{
		var user = _db.Users.FirstOrDefault(u =>
			u.Username == model.UserName &&
			u.PasswordHash == model.Password);

		if (user == null) return null;

		return new UserDTO
		{
			UserId = user.Id,
			UserName = user.Username,
			Role = user.Role
		};
	}
}

Cookie options (automatic):

  • Expiration: 20 minutes (sliding)
  • SameSite: Strict
  • HttpOnly: true
  • AccessDeniedPath: /Forbidden/

Step 4: IP Whitelisting Middleware

Restrict access to specific IP addresses (VPN, internal tools, admin panels):

appsettings.json:

{
  "AllowedIPs": [
	"192.168.1.100",
	"10.0.0.50",
	"203.0.113.42"
  ]
}

Program.cs:

var app = builder.Build();

// ✅ IP filtering middleware
app.UseIpFilterMiddleware();

app.UseAuthentication();
app.UseAuthorization();
app.MapControllers();
app.Run();

Features:

  • ✅ Handles X-Forwarded-For header (proxies, load balancers)
  • ✅ 20-second cache for performance
  • ✅ Returns 403 Forbidden for blocked IPs
  • ✅ Whitelist reloads automatically

Step 5: Secure Login with SecurityContext

For Web APIs with external token generation service:

[ApiController]
[Route("api/[controller]")]
public class AuthController : ControllerBase
{
	[HttpPost("login")]
	[AllowAnonymous]
	public async Task<IActionResult> Login([FromBody] UserModel userModel)
	{
		userModel.Password = userModel.Password?.ToMd5();

		// ✅ SecurityContext handles token generation via external service
		var token = await SecurityContext.Login(this, userModel);

		if (string.IsNullOrEmpty(token))
			return Unauthorized(new { Message = "Invalid credentials" });

		return Ok(new { Token = token, ExpiresIn = 3600 });
	}
}

How it works:

  1. SecurityContext.Login() posts credentials to Jwt:Issuer URL (your token service)
  2. Token service validates user and generates JWT
  3. Token stored in HttpContext.Session["Token"]
  4. Returns token for client storage

Shares a JWT token via cookie between a legacy (.NET 4.7.2) and a modern (.NET 8) app on the same domain.

Program.cs (.NET 8 app):

// Default cookie name is "auth_token"
var app = builder.UseJwtTokenAuthorization("auth_token");
app.MapControllers();
app.Run();

If the auth_token cookie is present, JWT validation runs automatically. The Authorization header continues to work as well.


Step 7: .NET Framework 4.7.2 — JwtAuthConfig

The JwtAuthConfig class targets netstandard2.0 and can be used in .NET Framework 4.7.2 projects.

Global.asax.cs or Startup.cs (once at startup):

using Chd.Security.Auth;

// From appsettings / IConfiguration:
JwtAuthConfig.UseJwtAuth(configuration);

// Or manually:
JwtAuthConfig.UseJwtAuth(
	tokenServiceUrl: "https://company.com/TokenBuilder/login",
	issuer: "https://company.com",
	audience: "https://company.com",
	key: "shared-secret-key-min-32-characters!!"
);

Login and write cookie:

string token = JwtAuthConfig.GetToken("username", "password");

// Store in session
Session["auth_token"] = token;

// Write to cookie for domain sharing
Response.Cookies.Add(new HttpCookie("auth_token")
{
	Value = token,
	HttpOnly = true,
	Secure = true,
	Expires = DateTime.Now.AddHours(8),
	Domain = ".company.com",
	Path = "/"
});

Validate token:

bool isValid = JwtAuthConfig.ValidateToken(Session["auth_token"]?.ToString());
if (!isValid) Response.Redirect("/Login");

Hybrid Architecture (.NET 4.7.2 + .NET 8)

Ideal scenario for gradually migrating a legacy app to .NET 8 on the same domain:

[company.com -- .NET 4.7.2]
		|  POST /TokenBuilder/login
		v
[Library.Security.IdentityServer -- .NET 8]  <-- generates JWT
		|  returns token
		v
[company.com -- .NET 4.7.2]  <-- writes cookie (Domain=.company.com)
		|  user navigates to /new/
		v
[company.com/new/ -- .NET 8]  <-- UseJwtTokenAuthorization("auth_token") reads cookie

Both apps must share the same appsettings.json values:

{
  "Jwt": {
	"Key": "shared-secret-key-min-32-characters!!",
	"Issuer": "https://company.com",
	"Audience": "https://company.com",
	"ServiceUrl": "https://company.com/TokenBuilder/login"
  }
}

Gradual migration plan:

Today:   [4.7.2 -- all modules]
Month 1: [4.7.2 -- module A] + [.NET 8 -- module B]
Month 2: [4.7.2 -- module A] + [.NET 8 -- B, C, D]
Final:   [.NET 8 -- all modules]

Configuration Reference

JWT Configuration (Symmetric)

{
  "Jwt": {
	"Key": "YOUR_MINIMUM_32_CHARACTER_SECRET_KEY",
	"Issuer": "https://your-auth-server.com",
	"Audience": "your-api-name",
	"Mode": "Symmetric"
  }
}
Property Required Description
Key ✅ Yes Secret key for signing tokens (min 32 chars for HS256)
Issuer ✅ Yes Token issuer URL (your auth server)
Audience ✅ Yes Token audience (your API name)
Mode ❌ No "Symmetric" (default) or "Asymmetric"

JWT Configuration (Asymmetric - RSA)

{
  "Jwt": {
	"Mode": "Asymmetric",
	"PublicKeyPath": "Keys/public_key.xml",
	"PrivateKeyPath": "Keys/private_key.xml",
	"Issuer": "https://your-auth-server.com",
	"Audience": "your-api-name"
  }
}
{
  "SecurityConfig": {
	"Issuer": "https://your-app.com",
	"Audience": "your-app-users",
	"Key": "YOUR_SECRET_KEY"
  }
}

IP Whitelist Configuration

{
  "AllowedIPs": [
	"192.168.1.0/24",
	"10.0.0.50",
	"203.0.113.42"
  ]
}

Full Configuration Reference:

Key Description Example
Jwt:Key Secret key (min 32 characters) "abc123...xyz"
Jwt:Issuer Token issuer "https://company.com"
Jwt:Audience Token audience "https://company.com"
Jwt:Mode "Symmetric" or "Asymmetric" "Symmetric"
Jwt:PrivateKeyPath RSA private key path (Asymmetric) "Keys/private_key.xml"
Jwt:PublicKeyPath RSA public key path (Asymmetric) "Keys/public_key.xml"
Jwt:ServiceUrl Token service URL (.NET 4.7.2) "https://company.com/TokenBuilder/login"
AllowedIPs IP whitelist array ["192.168.1.1","::1"]

Real-World Examples

// Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddRazorPages();
var app = builder.UseCookieAuthorization(); // ✅ Cookie auth
app.MapRazorPages();
app.Run();

// Pages/Account/Login.cshtml.cs
public class LoginModel : PageModel
{
	private readonly ShopDbContext _db;

	public LoginModel(ShopDbContext db) => _db = db;

	[BindProperty] public string Email { get; set; }
	[BindProperty] public string Password { get; set; }

	public async Task<IActionResult> OnPostAsync()
	{
		var userModel = new UserModel
		{
			UserName = Email,
			Password = Password.ToMd5()
		};

		bool success = await SecurityContext.LoginCookieAuthentitation(
			this,
			userModel,
			user =>
			{
				var dbUser = _db.Users.FirstOrDefault(u =>
					u.Email == user.UserName &&
					u.PasswordHash == user.Password);

				if (dbUser == null) return null;

				return new UserDTO
				{
					UserId = dbUser.Id,
					UserName = dbUser.Email,
					Role = dbUser.Role
				};
			}
		);

		if (success)
			return RedirectToPage("/Dashboard");

		ModelState.AddModelError("", "Invalid email or password");
		return Page();
	}
}

// Pages/Dashboard.cshtml.cs
[Authorize]
public class DashboardModel : PageModel
{
	public string Username => User.Identity?.Name ?? "Guest";

	public void OnGet() { }
}

Example 2: Web API with JWT + IP Filtering

// Program.cs
var builder = WebApplication.CreateBuilder(args);

builder.Services.UseJwtTokenAuthorization(builder.Configuration);
builder.Services.AddControllers();

var app = builder.Build();

// ✅ IP filtering for admin routes only
app.UseWhen(
	context => context.Request.Path.StartsWithSegments("/api/admin"),
	appBuilder => appBuilder.UseIpFilterMiddleware()
);

app.UseAuthentication();
app.UseAuthorization();
app.MapControllers();
app.Run();

// Controllers/AdminController.cs
[ApiController]
[Route("api/admin")]
[Authorize]
public class AdminController : ControllerBase
{
	// ✅ Only accessible from whitelisted IPs
	[HttpGet("users")]
	public IActionResult GetUsers()
	{
		return Ok(new { Message = "Admin data" });
	}
}

Example 3: Microservices with Centralized Auth

// Auth Service (Token Generation)
[HttpPost("token")]
public IActionResult GenerateToken([FromBody] UserModel model)
{
	var user = ValidateUser(model);
	if (user == null) return Unauthorized();

	var token = _tokenService.BuildToken(user);
	return Ok(new { Token = token });
}

// Product Service (Token Validation) — Program.cs
var builder = WebApplication.CreateBuilder(args);
builder.Services.UseJwtTokenAuthorization(builder.Configuration);
// Product Service — appsettings.json
{
  "Jwt": {
	"Issuer": "https://auth-service.com",
	"Audience": "product-service",
	"Key": "SHARED_SECRET_KEY"
  }
}

API Reference

Extension Methods

Method Signature Description
UseJwtTokenAuthorization (IServiceCollection, IConfiguration) Service registration only — call UseAuthentication separately
UseJwtTokenAuthorization (WebApplicationBuilder) Full JWT setup with session and middleware
UseJwtTokenAuthorization (WebApplicationBuilder, string cookieName) JWT setup with cookie sharing
UseCookieAuthorization (WebApplicationBuilder) Cookie-based authentication
UseIPFilter (IApplicationBuilder, List<string>?) IP whitelist middleware
JwtAuthConfig.UseJwtAuth (IConfiguration) or (url, issuer, audience, key) .NET 4.7.2 setup
JwtAuthConfig.GetToken (string userName, string password) Request a token (.NET 4.7.2)
JwtAuthConfig.ValidateToken (string token) Validate a token (.NET 4.7.2)

SecurityContext Class

// JWT login (calls external token service)
Task<string> SecurityContext.Login(
	ControllerBase controller,
	UserModel userModel
)

// Cookie login (local validation)
Task<bool> SecurityContext.LoginCookieAuthentitation(
	Controller controller,
	UserModel userModel,
	Func<UserModel, UserDTO> validationFunc
)

ITokenService Interface

public interface ITokenService
{
	string BuildToken(UserDTO user);
	bool ValidateToken(string token);
	ClaimsPrincipal GetPrincipalFromToken(string token);
}

Models

public class UserModel
{
	public string UserName { get; set; }
	public string Password { get; set; }
}

public class UserDTO
{
	public int UserId { get; set; }
	public string UserName { get; set; }
	public string Role { get; set; }
}

public class SecurityConfig
{
	public string Issuer { get; set; }
	public string Audience { get; set; }
	public string Key { get; set; }
}

Security Best Practices

  1. Use HTTPS only — JWT tokens are vulnerable to interception
  2. Store keys in environment variables — Never commit secrets to source control
  3. Rotate keys regularly — Update Jwt:Key every 90 days
  4. Use asymmetric keys for microservices — Private key only on auth service
  5. Hash passwords — Use .ToMd5() or better: BCrypt, PBKDF2
  6. Set short token lifetimes — 15–60 minutes for sensitive APIs
  7. Implement refresh tokens — For long-lived sessions
  8. ⚠️ Don't use MD5 for production passwords — Use ASP.NET Core Identity or BCrypt

Troubleshooting

Issue: 401 Unauthorized even with valid token

Cause: Issuer/Audience mismatch or expired token

Fix:

options.TokenValidationParameters = new TokenValidationParameters
{
	ValidateIssuer = true,
	ValidIssuer = "YOUR_ISSUER",       // ✅ Must match token's "iss" claim
	ValidateAudience = true,
	ValidAudience = "YOUR_AUDIENCE",   // ✅ Must match token's "aud" claim
	ValidateLifetime = true            // ✅ Checks "exp" claim
};

Issue: IP filtering blocks legitimate users

Cause: Proxy/load balancer not forwarding real client IP

Fix:

// Enable X-Forwarded-For header forwarding BEFORE IP filter middleware
app.UseForwardedHeaders(new ForwardedHeadersOptions
{
	ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto
});

app.UseIpFilterMiddleware();

Issue: "Key length is too short" error

Cause: JWT key must be at least 256 bits (32 characters) for HS256

Fix:

{
  "Jwt": {
	"Key": "THIS_IS_A_VERY_LONG_SECRET_KEY_AT_LEAST_32_CHARS_123456!"
  }
}

FAQ

Scenario Recommendation
Web API (mobile/SPA clients) JWT
Razor Pages / MVC (server-side) Cookie
Microservices JWT
Internal admin tools Cookie + IP filtering
.NET 4.7.2 + .NET 8 shared domain JwtAuthConfig + JWT + Cookie Sharing

2. How do I refresh expired tokens?

[HttpPost("refresh")]
public IActionResult RefreshToken([FromBody] string refreshToken)
{
	var user = ValidateRefreshToken(refreshToken);
	if (user == null) return Unauthorized();

	var newToken = _tokenService.BuildToken(user);
	return Ok(new { Token = newToken });
}

Yes! Use JWT for API endpoints and Cookie for Razor Pages:

services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
	.AddJwtBearer(options => { /* JWT config */ })
	.AddCookie(options => { /* Cookie config */ });

// Apply [Authorize(AuthenticationSchemes = JwtBearerDefaults.AuthenticationScheme)]
// to API controllers

4. Is MD5 secure for password hashing?

No! MD5 is deprecated for passwords. Use:

  • BCrypt (recommended): BCrypt.Net.HashPassword(password)
  • ASP.NET Core Identity (built-in): Handles hashing + salting automatically

Package Description NuGet
Chd.Common Infrastructure primitives (encryption, config, extensions) NuGet
Chd.Min.IO MinIO/S3 object storage with image optimization NuGet
Chd.Logging Structured logging with Serilog (Graylog, MSSQL, file sinks) NuGet
Chd.Caching Redis distributed caching with AOP attributes NuGet

Contributing 🤝

Found a security vulnerability? Please do not open a public issue. Email security@chd.dev instead.

For feature requests:

  1. Issues: GitHub Issues
  2. Pull Requests: GitHub PRs

Authors

See also contributors on NuGet


License 📜

This package is free and open-source under the MIT License.


Made with ❤️ by the CHD Team
Cleverly Handle Difficulty 🔐

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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 Chd.Security:

Package Downloads
Chd.AutoUI

CHD AutoUI - Attribute-based metadata generation for dynamic UI components. Create dynamic forms and grids with C# attributes. Supports 12 field types including dropdown, multiselect, date, file upload and more.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
8.6.2 35 7/21/2026
8.6.1 42 7/21/2026
8.6.0 47 7/20/2026
8.5.9 181 3/15/2026