Skip to content

Commit

Permalink
fix: error unprotecting key with kid
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jan 21, 2023
1 parent 8929824 commit 8eef54d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Aguacongas.TheIdServer.Duende/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@
}
},
"DataProtectionOptions": {
"StorageKind": "EntityFramework"
"StorageKind": "EntityFramework",
"ApplicationName": "TheIdServer"
},
"DisableTokenCleanup": true,
"TokenCleanupInterval": "00:05:00",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ public static IDataProtectionBuilder ConfigureDataProtection(this IDataProtectio
{
return builder;
}
builder.AddKeyManagementOptions(options => configuration.GetSection(nameof(KeyManagementOptions))?.Bind(options));
builder.AddKeyManagementOptions(options => configuration.GetSection(nameof(KeyManagementOptions))?.Bind(options))
.SetApplicationName(dataProtectionsOptions.ApplicationName);
ConfigureEncryptionAlgorithm(builder, configuration);
switch (dataProtectionsOptions.StorageKind)
{
Expand Down
2 changes: 2 additions & 0 deletions src/Aguacongas.TheIdServer/Models/DataProtectionOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ public class DataProtectionOptions : Microsoft.AspNetCore.DataProtection.DataPro
public KeyProtectionOptions KeyProtectionOptions { get; set; }

public RedisKey RedisKey { get; set; } = "DataProtection-Keys";

public string ApplicationName { get; set; } = "TheIdServer";
}

public class KeyProtectionOptions
Expand Down

0 comments on commit 8eef54d

Please sign in to comment.