dotnet add package AspNetCore.DataProtection.CSRedis
public void ConfigureServices(IServiceCollection services)
{
var redisConnection = "localhost:6379, password=redis123, defaultDatabase=8";
services.AddDataProtection()
.PersistKeysToCSRedis(new CSRedisClient(redisConnection), "IdentityServerCSRedis-DataProtection-Keys");
}
dotnet add package AspNetCore.DataProtection.NewLifeRedis
public void ConfigureServices(IServiceCollection services)
{
services.AddDataProtection()
.PersistKeysToNewLifeRedis(
new ProtectionFullRedis("127.0.0.1:6379", "redis123", 9),
"IdentityServerNewLifeRedis-DataProtection-Keys");
}