Skip to content

cdpidan/DataProtection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Data Protection

CSRedis

nuget

dotnet add package AspNetCore.DataProtection.CSRedis

inject

public void ConfigureServices(IServiceCollection services)
{
    var redisConnection = "localhost:6379, password=redis123, defaultDatabase=8";

    services.AddDataProtection()
        .PersistKeysToCSRedis(new CSRedisClient(redisConnection), "IdentityServerCSRedis-DataProtection-Keys");
}

引用

CSRedis

NewLife.Redis

nuget

dotnet add package AspNetCore.DataProtection.NewLifeRedis

inject

public void ConfigureServices(IServiceCollection services)
{
    services.AddDataProtection()
        .PersistKeysToNewLifeRedis(
            new ProtectionFullRedis("127.0.0.1:6379", "redis123", 9),
            "IdentityServerNewLifeRedis-DataProtection-Keys");
}

引用

NewLife.Redis

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages