Lyo.Privacy.AspNetCore 2.0.0

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

Lyo.Privacy.AspNetCore

DI wiring for Lyo.Privacy on ASP.NET Core: registers ITextRedactor / IStructuredRedactor, binds PrivacyRedactorOptions from configuration, and allows keyed per-tenant or per-feature policies.

Examples

First steps

using Lyo.Privacy.AspNetCore;

services.AddLyoPrivacy(builder.Configuration, configureDefaultPolicy: p => p
    .RedactEmail()
    .RedactCreditCards());

// Keyed: support-tier policy with looser PII rules
services.AddLyoPrivacyPolicy("Support", p => p
    .RedactCreditCards());

PrivacyServiceCollectionExtensions

Extension What it does
services.AddLyoPrivacy(IConfiguration? configuration = null, Action<PrivacyRedactorOptions>? configureOptions = null, Action<RedactionPolicyBuilder>? configureDefaultPolicy = null) When an IConfiguration is supplied, binds PrivacyRedactorOptions from section PrivacyRedactorOptions.SectionName, applies an optional inline overrides callback, and registers singleton ITextRedactor (TextRedactor) plus IStructuredRedactor (JsonRedactor). If PrivacyRedactorOptions.JsonApplyTextRulesToStrings is true, the structured redactor reuses the text redactor. IMetrics is used when present; otherwise NullMetrics.Instance.
services.AddLyoPrivacyPolicy(object serviceKey, Action<RedactionPolicyBuilder> configure) Registers a keyed ITextRedactor built from a custom RedactionPolicyBuilder. Reach for this when one host needs different redaction rules per workload (e.g. "Support", "Marketing"). When Name is unset, the policy defaults it to serviceKey.ToString().

Dependencies

Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).

  • Lyo.Metrics (direct, lyo)
  • Lyo.Privacy (direct, lyo)
  • Lyo.Common.Core (transitive, lyo)
  • Lyo.Common.Metadata (transitive, lyo)
  • Lyo.Exceptions (transitive, lyo)
  • Lyo.Hashing (transitive, lyo)
  • Microsoft.Bcl.AsyncInterfaces 10.0.5 (transitive, microsoft, netstandard2.0)
  • Microsoft.Extensions.DependencyInjection.Abstractions 10.0.5 (transitive, microsoft)
  • System.Collections.Immutable 10.0.5 (transitive, microsoft, netstandard2.0)
  • System.IO.Hashing 10.0.5 (transitive, microsoft, net10.0)
  • System.Memory 4.6.3 (transitive, microsoft, netstandard2.0)
  • System.Text.Json 10.0.5 (transitive, microsoft, netstandard2.0)
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
2.0.0 72 9/9/2026
1.0.13 121 8/25/2026
1.0.11 93 8/23/2026
1.0.9 111 8/22/2026
1.0.6 92 8/20/2026
1.0.4 109 8/20/2026
1.0.3 95 8/19/2026
1.0.2 93 8/19/2026
1.0.1 88 8/18/2026
1.0.0 107 8/16/2026