diff options
| author | ivarlovlie <git@ivarlovlie.no> | 2022-06-16 19:04:29 +0200 |
|---|---|---|
| committer | ivarlovlie <git@ivarlovlie.no> | 2022-06-16 20:47:49 +0200 |
| commit | a19e31557f6ef33ed33d694968abe7416e878c60 (patch) | |
| tree | 7de1ac12c4fea95e0a6909e1e5d05e5c490858de /server/src/Data | |
| parent | e86e98b2f96e91f583e8c3849f06ce0cc12fe8da (diff) | |
| download | greatoffice-a19e31557f6ef33ed33d694968abe7416e878c60.tar.xz greatoffice-a19e31557f6ef33ed33d694968abe7416e878c60.zip | |
feat: Add support for db-backed data protection key persistence
Also update packages
Diffstat (limited to 'server/src/Data')
| -rw-r--r-- | server/src/Data/AppDbContext.cs | 5 |
1 files changed, 4 insertions, 1 deletions
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<AppDbContext> options) : base(options) { } public DbSet<User> Users { get; set; } @@ -11,6 +13,7 @@ public class AppDbContext : DbContext public DbSet<GithubUserMapping> GithubUserMappings { get; set; } public DbSet<ApiAccessToken> AccessTokens { get; set; } public DbSet<Tenant> Tenants { get; set; } + public DbSet<DataProtectionKey> DataProtectionKeys { get; set; } protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity<User>(e => { |
