From a19e31557f6ef33ed33d694968abe7416e878c60 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Thu, 16 Jun 2022 19:04:29 +0200 Subject: feat: Add support for db-backed data protection key persistence Also update packages --- server/src/Data/AppDbContext.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/src/Data') diff --git a/server/src/Data/AppDbContext.cs b/server/src/Data/AppDbContext.cs index ae34861..a5ef36e 100644 --- a/server/src/Data/AppDbContext.cs +++ b/server/src/Data/AppDbContext.cs @@ -1,6 +1,8 @@ +using Microsoft.AspNetCore.DataProtection.EntityFrameworkCore; + namespace IOL.GreatOffice.Api.Data; -public class AppDbContext : DbContext +public class AppDbContext : DbContext, IDataProtectionKeyContext { public AppDbContext(DbContextOptions options) : base(options) { } public DbSet Users { get; set; } @@ -11,6 +13,7 @@ public class AppDbContext : DbContext public DbSet GithubUserMappings { get; set; } public DbSet AccessTokens { get; set; } public DbSet Tenants { get; set; } + public DbSet DataProtectionKeys { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity(e => { -- cgit v1.3