Skip to content

interflare/dataprotection-marten

Repository files navigation

Marten Data Protection Persistence

NuGet version of Interflare.DataProtection.Marten Latest release version

Status of CI workflow Status of release workflow

ASP.NET Core Data Protection key persistence using Marten. Useful for projects already using Marten that want to store data protection keys in the same PostgreSQL database.

Installation

dotnet add package Interflare.DataProtection.Marten

Usage

Call PersistKeysToMarten() when configuring data protection. It merges with your existing Marten configuration.

services.AddMarten(/* ... */);

services.AddDataProtection()
    .PersistKeysToMarten();

Keys are stored as DataProtectionKey documents in your Marten document store. The schema is created automatically when Marten runs its migrations.

Requirements

  • .NET 8, 9, or 10
  • Marten 8.x

License

MIT

About

Marten implementation of ASP.NET Core Data Protection API key persistence

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages